Re: [PATCH] Re: Lyx crashes on exit (windows)
Bo Peng wrote: This patch properly shut down what's needed to avoid the crashes. OK? I do not know this part of the code so you decide. Also, I did not use multi-view when I had the crashes. I suppose it depends on the machine and on when the statusbar timer was timed out. Anyway, this patch just adds safe guards when closing a view or when exiting so it is pretty safe. Abdel.
Re: [PATCH] Re: Lyx crashes on exit (windows)
This patch properly shut down what's needed to avoid the crashes. OK? I do not know this part of the code so you decide. Also, I did not use multi-view when I had the crashes. Bo
[PATCH] Re: Lyx crashes on exit (windows)
Joost Verburg wrote: Bo Peng wrote: Kind of randomly, but frequently, when lyx exists, a dialog shows up and says: The instruction at )x0190f7b0 referenced memory at 0x6d729b1. The memory could not be written. Click OK to terminate the program. I can reproduce this crash (also without command window). Especially when I've done some editing, LyX crashes on exit once every few times. Maybe some objects are not closed in the right order? OK, I could reproduce some crash when closing one view or when quitting when there is multiple view. This patch properly shut down what's needed to avoid the crashes. OK? Abdel. Index: frontends/qt4/GuiView.cpp === --- frontends/qt4/GuiView.cpp (revision 19080) +++ frontends/qt4/GuiView.cpp (working copy) @@ -288,8 +288,14 @@ } } + // Make sure that no LFUN use this close to be closed View. + theLyXFunc().setLyXView(0); + // Make sure the timer time out will not trigger a statusbar update. + statusbar_timer_.stop(); + theApp()->gui().unregisterView(id()); if (!theApp()->gui().viewIds().empty()) { + quitting = true; // Just close the window and do nothing else if this is not the // last window. close_event->accept(); Index: LyXFunc.cpp === --- LyXFunc.cpp (revision 19080) +++ LyXFunc.cpp (working copy) @@ -1841,7 +1841,7 @@ } } } - if (!quitting) { + if (!quitting && lyx_view_) { lyx_view_->updateMenubar(); lyx_view_->updateToolbars(); // Some messages may already be translated, so we cannot use _()
Re: Lyx crashes on exit (windows)
Bo Peng wrote: Kind of randomly, but frequently, when lyx exists, a dialog shows up and says: The instruction at )x0190f7b0 referenced memory at 0x6d729b1. The memory could not be written. Click OK to terminate the program. I can reproduce this crash (also without command window). Especially when I've done some editing, LyX crashes on exit once every few times. Maybe some objects are not closed in the right order? Joost
Re: Lyx crashes on exit (windows)
You could disable the command window with the linker option /SUBSYSTEM:WINDOWS Then, as far as I know, a command window will jump out whenever I run some external command such as python that needs stdin/out. Joost's lyx.exe/lyxc.exe solution is good enough. BO
Re: Lyx crashes on exit (windows)
Bo Peng wrote: > On 7/13/07, Bo Peng <[EMAIL PROTECTED]> wrote: >> Kind of randomly, but frequently, when lyx exists, a dialog shows up >> and says: >> >> The instruction at )x0190f7b0 referenced memory at 0x6d729b1. The >> memory could not be written. Click OK to terminate the program. > > Have not finally confirmed, but this might be my problem. When I start > lyx, a command window is also started. I sometimes close lyx by right > click 'close this group' from windows task bar, and windows may close > the command window before lyx.exe, therefore the crash. > > Using the lyx.exe (lyxc.exe) from the windows installer should not > have this problem. > > Cheers, > Bo > You could disable the command window with the linker option /SUBSYSTEM:WINDOWS -- Peter Kümmel
Re: Lyx crashes on exit (windows)
On 7/13/07, Bo Peng <[EMAIL PROTECTED]> wrote: Kind of randomly, but frequently, when lyx exists, a dialog shows up and says: The instruction at )x0190f7b0 referenced memory at 0x6d729b1. The memory could not be written. Click OK to terminate the program. Have not finally confirmed, but this might be my problem. When I start lyx, a command window is also started. I sometimes close lyx by right click 'close this group' from windows task bar, and windows may close the command window before lyx.exe, therefore the crash. Using the lyx.exe (lyxc.exe) from the windows installer should not have this problem. Cheers, Bo
Re: Lyx crashes on exit (windows)
> Revision 19044 was perfect for me so it anything happened this must be > after this revision. Could it be related to the recent locale/language > problems? recent locale/language patches were reverted from tree. pavel
Re: Lyx crashes on exit (windows)
Bo Peng wrote: Kind of randomly, but frequently, when lyx exists, a dialog shows up and says: The instruction at )x0190f7b0 referenced memory at 0x6d729b1. The memory could not be written. Click OK to terminate the program. Revision 19044 was perfect for me so it anything happened this must be after this revision. Could it be related to the recent locale/language problems? Without a backtrace there's not much we can do... Abdel.