Re: Master: Undo crash with change of document language

2017-12-20 Thread Kornel Benko
Am Mittwoch, 20. Dezember 2017 um 15:03:16, schrieb Jürgen Spitzmüller > Am Mittwoch, den 20.12.2017, 14:46 +0100 schrieb Jean-Marc Lasgouttes: > > Le 20/12/2017 à 10:05, Jürgen Spitzmüller a écrit : > > > > Shall we add a special casing to DocumentClass:addLayoutIfNeeded, > > > > or > > > > just

Re: Master: Undo crash with change of document language

2017-12-20 Thread Kornel Benko
Am Mittwoch, 20. Dezember 2017 um 16:06:18, schrieb Jean-Marc Lasgouttes > Le 20/12/2017 à 10:05, Jürgen Spitzmüller a écrit : > >> Shall we add a special casing to DocumentClass:addLayoutIfNeeded, or > >> just fix tex2lyx so that it creates correct files? > > > > I'd suggest the latter. > > te

Re: Master: Undo crash with change of document language

2017-12-20 Thread Jean-Marc Lasgouttes
Le 20/12/2017 à 10:05, Jürgen Spitzmüller a écrit : Shall we add a special casing to DocumentClass:addLayoutIfNeeded, or just fix tex2lyx so that it creates correct files? I'd suggest the latter. tex2lyx is fixed in master at 40a3a44aa2. Of course this makes our tex2lyx tests fail (with the

Re: Master: Undo crash with change of document language

2017-12-20 Thread Jürgen Spitzmüller
Am Mittwoch, den 20.12.2017, 14:46 +0100 schrieb Jean-Marc Lasgouttes: > Le 20/12/2017 à 10:05, Jürgen Spitzmüller a écrit : > > > Shall we add a special casing to DocumentClass:addLayoutIfNeeded, > > > or > > > just fix tex2lyx so that it creates correct files? > > > > I'd suggest the latter. >

Re: Master: Undo crash with change of document language

2017-12-20 Thread Jean-Marc Lasgouttes
Le 20/12/2017 à 10:05, Jürgen Spitzmüller a écrit : Shall we add a special casing to DocumentClass:addLayoutIfNeeded, or just fix tex2lyx so that it creates correct files? I'd suggest the latter. I guess the right question was: should be do both, for the sake of existing files? JMarc

Re: Master: Undo crash with change of document language

2017-12-20 Thread Jürgen Spitzmüller
Am Montag, den 18.12.2017, 18:14 +0100 schrieb Jean-Marc Lasgouttes: > The Flex: prefix is wrong and we do not use it anymore since at least > 3 > years ago (cfeddb92). Jürgen, Richard, do you remember the details? I don't. > Should tex2lyx skip the Flex: when writing files? I think we did not >

Re: Master: Undo crash with change of document language

2017-12-18 Thread Jean-Marc Lasgouttes
Le 18/12/2017 à 17:44, Jean-Marc Lasgouttes a écrit : We will know that once we understand what happens (and if the file is correct). What happens is that the file src/tex2lyx/test/test-insets.lyx.lyx, created by tex2lyx, contains: \begin_inset Flex Flex:URL status collapsed \begin_layout P

Re: Master: Undo crash with change of document language

2017-12-18 Thread Kornel Benko
Am Montag, 18. Dezember 2017 um 17:44:35, schrieb Jean-Marc Lasgouttes > Le 18/12/2017 à 17:27, Kornel Benko a écrit : > >> My point is that I am not sure that I had a valid reason to add the > >> assertion at the time. I just thought it was a good idea, as far as I > >> remember. > > > > I stil

Re: Master: Undo crash with change of document language

2017-12-18 Thread Jean-Marc Lasgouttes
Le 18/12/2017 à 17:27, Kornel Benko a écrit : My point is that I am not sure that I had a valid reason to add the assertion at the time. I just thought it was a good idea, as far as I remember. I still think, it is. My thinking now is that we had an error dialog already. Does the assertion a

Re: Master: Undo crash with change of document language

2017-12-18 Thread Kornel Benko
Am Sonntag, 17. Dezember 2017 um 23:10:35, schrieb Jean-Marc Lasgouttes > Le 17/12/2017 à 20:29, Kornel Benko a écrit : > > And the point is, that lyx crashes on an (innocent?) Undo. > > > >> This is not something that appears in production builds anyway. > > > > We have asserts exactly because

Re: Master: Undo crash with change of document language

2017-12-17 Thread Jean-Marc Lasgouttes
Le 17/12/2017 à 20:29, Kornel Benko a écrit : And the point is, that lyx crashes on an (innocent?) Undo. This is not something that appears in production builds anyway. We have asserts exactly because we want to make lyx robust. Am I misunderstanding something? My point is that I am not su

Re: Master: Undo crash with change of document language

2017-12-17 Thread Kornel Benko
Am Sonntag, 17. Dezember 2017 um 19:55:54, schrieb Jean-Marc Lasgouttes > Le 17/12/2017 à 19:14, Kornel Benko a écrit : > > > > Reliably. > > > > 1.) Open src/tex2lyx/test/test-insets.lyx.lyx > > 2.) Change document language to 'Slovak' > > (Ignore warnings about undefined flex inset Flex:F

Re: Master: Undo crash with change of document language

2017-12-17 Thread Jean-Marc Lasgouttes
Le 17/12/2017 à 19:14, Kornel Benko a écrit : Reliably. 1.) Open src/tex2lyx/test/test-insets.lyx.lyx 2.) Change document language to 'Slovak' (Ignore warnings about undefined flex inset Flex:Flex:URL) 3.) Use menu "Back" (e.g. Undo) ==> crash Actually, the error _is_ the problem (see

Master: Undo crash with change of document language

2017-12-17 Thread Kornel Benko
Reliably. 1.) Open src/tex2lyx/test/test-insets.lyx.lyx 2.) Change document language to 'Slovak' (Ignore warnings about undefined flex inset Flex:Flex:URL) 3.) Use menu "Back" (e.g. Undo) ==> crash support/lassert.cpp (51): ASSERTION el.empty() VIOLATED IN /usr2/src/lyx/lyx-git/src/Undo