On Wed, May 10, 2000 at 06:49:37PM +0200, U. Guenther wrote: > Sometimes lyx crashes upon pressing ctrl-s (save). > > One possible reason is that in a complicated equation some {} brackets are > incomplete (e.g. after editing the equation). In such a case lyx will crash > when save (ctrl-s) is invoked. > > I have attached an example. Remove the {underset{k_32} and save. (Including > the left '{' which is supposed to stay). Lyx 1.1.5pre2 will reproducibly crash. > This does not happen in 1.1.4. Thanks for your report. I've managed to find and fix the bug. Are there any other cases which cause LyX to crash on save?
Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.315 diff -u -p -r1.315 ChangeLog --- ChangeLog 2000/05/10 11:50:10 1.315 +++ ChangeLog 2000/05/10 21:27:53 @@ -1,3 +1,8 @@ +2000-05-10 Dekel Tsur <[EMAIL PROTECTED]> + + * src/mathed/math_write.C (MathParInset::Write): Fixed a bug: + crush when saving formulae with unbalanced parenthesis. + 2000-05-10 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * src/lyxlookup.C (isDeadEvent): use a switch statement instead of Index: src/mathed/math_write.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_write.C,v retrieving revision 1.18 diff -u -p -r1.18 math_write.C --- src/mathed/math_write.C 2000/04/26 13:57:27 1.18 +++ src/mathed/math_write.C 2000/05/10 21:27:53 @@ -287,7 +287,8 @@ void MathParInset::Write(ostream & os, b } #else // Something like this should work too: - os << string(brace, '}'); // not one-off error I hope. + if (brace > 0) + os << string(brace, '}'); // not one-off error I hope. #endif }