Martin Vermeer wrote:
On Fri, Nov 02, 2007 at 12:45:49PM +0100, Helge Hafting wrote:
 Start lyx, open a "recent document" - assert.

 Case one (A11.lyx, beamer presentation)

...
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0xa62949b0 (LWP 10363)]
 0x0832ec16 in lyx::InsetCollapsable::dimensionCollapsed (this=0x8c5a5e8)
    at ../../lyx-devel/src/insets/InsetCollapsable.cpp:178
 178                     layout_.labelstring, dim.wid, dim.asc, dim.des);
 (gdb) bt
 #0  0x0832ec16 in lyx::InsetCollapsable::dimensionCollapsed (this=0x8c5a5e8)
    at ../../lyx-devel/src/insets/InsetCollapsable.cpp:178
 #1  0x083301ef in lyx::InsetCollapsable::metrics (this=0x8c5a5e8,
    [EMAIL PROTECTED], [EMAIL PROTECTED])
    at ../../lyx-devel/src/insets/InsetCollapsable.cpp:218
#2 0x0834eca8 in lyx::InsetFootlike::metrics (this=0x8c5a5e8, [EMAIL PROTECTED],

This is similar to the earlier reported bug for ERT.

From memory (I am travelling) the fix is to replace the call
in the constructor to InsetCollapse(bp) or ...(bp, status)
by ...(bp, collapse). In ERT, Footlike, perhaps more.

There is something fishy here that needs fixing at a more
fundamental level, but please try this first as I cannot do
much from here now.

The problems seems to lie in the default InsetLayout. I guess layout_.labelfont needs to be realized before being passed to the theFontMetrics?

Dimension InsetCollapsable::dimensionCollapsed() const
{
        Dimension dim;
        theFontMetrics(layout_.labelfont).buttonText(
                layout_.labelstring, dim.wid, dim.asc, dim.des);
        return dim;
}

Abdel.

Reply via email to