On 10/31/2010 05:42 AM, Scott Otterson wrote:
Has anyone seen this problem before? I have a short latex document (below the dotted line) that latex crunches without error. However, when I try to import it into lyx (file-->import plain latex) lyx manages to create a .lyx file but then hangs forever when it tries to read it (I've also put the output .lyx file below the dotted line).

Here's what cygwin lyx 1.6.6 sends to the command shell when it tries to read the .lyx file:

    Warning: #LyX file created by tex2lyx 1.6.6
    BufferParams::readToken(): Unknown token: default
    BufferParams.cpp(2365): Unknown inputenc value `\font_roman'.
    Using `auto' inst\
    ead.


There is a tex2lyx issue here: For some reason, the LyX file has just:
    \inputencoding
with no argument. But that's not the real issue.

I have the same problem with lyx 1.6.7 on Windows 7 and 1.6.6 on Ubuntu.

In debug mode, it crashes. I'm seeing an infinite loop in this code:

int VSpace::inPixels(BufferView const & bv) const
{
    // Height of a normal line in pixels (zoom factor considered)
    int const default_height = defaultRowHeight();

    switch (kind_) {

    case DEFSKIP:
        return bv.buffer().params().getDefSkip().inPixels(bv);

It seems that bv.buffer().params().getDefSkip() is just a VSpace, and so this calls itself.

The cause seems to be the line:
    \defskip 0.75\baselineskip
If this is changed to "default", the crash disappears. I guess this never gets handled in the VSpace constructor?

Richard

====

0    lyx::VSpace::inPixels    VSpace.cpp    518    0x00000000006a0b0f
1    lyx::VSpace::inPixels    VSpace.cpp    518    0x00000000006a0b32
2    lyx::VSpace::inPixels    VSpace.cpp    518    0x00000000006a0b32
3    lyx::VSpace::inPixels    VSpace.cpp    518    0x00000000006a0b32
4 lyx::TextMetrics::rowHeight TextMetrics.cpp 1076 0x0000000000677bd3 5 lyx::TextMetrics::redoParagraph TextMetrics.cpp 459 0x000000000067f1b5 6 lyx::BufferView::updateMetrics BufferView.cpp 2476 0x00000000006cc4d0 7 lyx::BufferView::resize BufferView.cpp 1933 0x00000000006cc702 8 lyx::frontend::GuiWorkArea::init GuiWorkArea.cpp 273 0x00000000009cd83d 9 lyx::frontend::GuiWorkArea::GuiWorkArea GuiWorkArea.cpp 251 0x00000000009ceda3 10 lyx::frontend::TabWorkArea::addWorkArea GuiWorkArea.cpp 1575 0x00000000009d5964 11 lyx::frontend::GuiView::addWorkArea GuiView.cpp 1152 0x00000000009ab8be 12 lyx::frontend::GuiView::setBuffer GuiView.cpp 1330 0x00000000009b26aa 13 lyx::frontend::GuiView::loadDocument GuiView.cpp 1819 0x00000000009b4a93 14 lyx::frontend::GuiView::openDocument GuiView.cpp 1897 0x00000000009b7b54 15 lyx::frontend::GuiApplication::dispatch GuiApplication.cpp 1330 0x0000000000988b0f 16 lyx::frontend::GuiApplication::dispatch GuiApplication.cpp 1096 0x00000000009813b9
17    lyx::dispatch    LyX.cpp    1228    0x00000000005a2218
18 lyx::frontend::Action::action Action.cpp 66 0x0000000000a1d023 19 lyx::frontend::Action::qt_metacall moc_Action.cpp 77 0x0000000000a1d083
20    QMetaObject::activate    qobject.cpp    3295    0x000000313ab66606
... <More>


Attachment: fail.lyx
Description: application/lyx

Reply via email to