Angus Leeming wrote: > Alfredo Braunstein wrote: >>> Incidentally, I've found another crash. Open up the document dialog >>> and change text class. Start with the familiar ones and apply. >>> Fine. Move down the list and apply. Keep doing this. Eventually >>> you'll get an assert. > >> Confirmed. It only happends with the class letter(g-brief) here (and >> btw I have two of them for some reason). What about there? > > I haven't investigated too closely. Things like prosper. It's clearly > a core issue though and therefore not my fault ;-)
I've chased the bug after dinner: The problem is the following: in the end of LyXFunc::dispatch, it sets the current layout in the layout dropdown: this will boom if that layout is not in the list of avail layouts (of the current class). Now what happends: in ControlDocument, both setting the class and changing unknown layouts (switchLayoutBetweenClasses) are now done dispatching two LFUNs in LYXFunc::dispatch, so no matter in which order you send them, they will be out of sync at the end of the first one of the two dispatches... [I don't know if this is understandable. I could try to explain it better] Alfredo