>>>>> "Baruch" == Baruch Even <[EMAIL PROTECTED]> writes:
Baruch> On 17 Oct 2000, Jean-Marc Lasgouttes wrote:
>> - crash when changing layout
>> http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg13171.html
Baruch> Changing the layout itself doesn't cause a crash, at least not
Baruch> with 1.1.6cvs.
Yes, it does not crash right away because I fixed a bug with macros
without arguments (in MathMacroTemplate, set args to zero if there are
no arguments).
Baruch> I did get LyX to crash with the following
Baruch> steps: 1. Open file lyxbug2.lyx that is in the message 2.
Baruch> Change layout to title 3. Undo 4. Click on the math
Baruch> environment, in order to edit it. 5. LyX goes boom
Baruch> The problem is in the undo mechanism, somewhere the copying
Baruch> for the undo is imperfect and a crash happens when trying to
Baruch> access a bad data.
I believe the (one?) problem is in InsetFormula::display(bool), where
every MathParInset is cloned/deleted (for a reason I do not
understand). With a macro, the result is not good, since the
MathMacroTable holds pointers to the macros which have been defined
(after the clone/delete thing, those pointers are stale).
In this case, display(false) is invoked because a Title layout is not
supposed to contain a displayed formula.
Tell me if you need more info (I'm not sure my description is useful
at all).
JMarc