Re: bug 1656
Jean-Marc Lasgouttes wrote: Stephan == Stephan Witt [EMAIL PROTECTED] writes: Stephan as promised yesterday I did some testing today. Thanks. Stephan With the patch the unsaved changes remains unsaved. Without Stephan the patch I was asked to save the changes. So far seems all Stephan well, Is this really what we want?? Yes, I meant to say: the behaviour is ok without the patch. The program should ask for saving the changes. And it shouldn't terminate. Stephan but after playing a while with gnome-save-session I now have Stephan the same behaviour as in Paris, the qt-library is unable to Stephan open the question box anymore! Even worse, I have to kill the Stephan lyx process to be able to do any work. All gnome applications Stephan are locked. It seems this is caused by the running Stephan gnome-save-session which is waiting for lyx returning from Stephan user response - what never happens. From reading the Qt doc about QSession, I do not see clearly how it is supposed to work... Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx it blocks the process of saving sessions completely. Really bad. The backtrace when interrupted from inside the debugger looks like the following: Program received signal SIGINT, Interrupt. 0xe410 in ?? () No breakpoints or watchpoints. #0 0xe410 in ?? () #1 0xbfffd648 in ?? () #2 0x085193f4 in ?? () #3 0x08519270 in ?? () #4 0x40b4af9d in ___newselect_nocancel () from /lib/tls/libc.so.6 #5 0x401dee8a in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #6 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #7 0x402338bf in QApplication::enter_loop () from /usr/lib/qt3/lib/libqt-mt.so.3 #8 0x40f99bef in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #9 0x40f99edc in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #10 0x40f9a137 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #11 0x40f9a198 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #12 0x40f5f044 in initializeIntegration () from /opt/kde3/lib/kde3/plugins/integration/libqtkde.so #13 0x401bc86f in QKDEIntegration::initLibrary () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x401bc8d5 in QKDEIntegration::enabled () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x40451e95 in QMessageBox::information () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x08216e2f in prompt_pimpl ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, cancel_butto n=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert_pimpl.C:44 #17 0x0820db82 in Alert::prompt ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, escape_bu tton=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert.C:44 #18 0x080bcad9 in BufferList::quitWriteBuffer (this=0x83f0ac4, buf=0x853e648) at bufferlist.C:83 #19 0x080bcca6 in BufferList::quitWriteAll (this=0x83f0ac4) at bufferlist.C:122 #20 0x08251e7e in LQApplication::commitData (this=0x83f4320, [EMAIL PROTECTED]) at lyx_gui.C:151 #21 0x401bef8c in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0x401bf061 in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #23 0x4094ccc1 in _SmcProcessMessage () from /usr/X11R6/lib/libSM.so.6 #24 0x4095b26e in IceProcessMessages () from /usr/X11R6/lib/libICE.so.6 #25 0x401bf3b4 in QSmSocketReceiver::socketActivated () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x401bf425 in QSmSocketReceiver::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x40294e7e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0x402954ad in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0x405e91f0 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3 #30 0x402b4a70 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #31 0x40231d5f in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0x40233a83 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #33 0x40225e76 in QEventLoop::activateSocketNotifiers () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0x401df242 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0x40249c96 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0x4023394f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #38 0x082524a0 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at lyx_gui.C:265 #39 0x081051f0 in LyX::priv_exec (this=0x8426ce8, [EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:28 6 #40 0x08104931 in LyX::exec ([EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:143 #41 0x08064437 in main (argc=1, argv=0xbfffe8f4) at main.C:47 It seems to be
Re: bug 1656
Stephan Witt wrote: Jean-Marc Lasgouttes wrote: Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx [...] It seems to be another problem with processEvents... I forgot to say it doesn't differ from unpatched lyx! Stephan --
Re: bug 1656
Jean-Marc Lasgouttes wrote: "Stephan" == Stephan Witt <[EMAIL PROTECTED]> writes: Stephan> as promised yesterday I did some testing today. Thanks. Stephan> With the patch the unsaved changes remains unsaved. Without Stephan> the patch I was asked to save the changes. So far seems all Stephan> well, Is this really what we want?? Yes, I meant to say: the behaviour is ok without the patch. The program should ask for saving the changes. And it shouldn't terminate. Stephan> but after playing a while with gnome-save-session I now have Stephan> the same behaviour as in Paris, the qt-library is unable to Stephan> open the question box anymore! Even worse, I have to kill the Stephan> lyx process to be able to do any work. All gnome applications Stephan> are locked. It seems this is caused by the running Stephan> gnome-save-session which is waiting for lyx returning from Stephan> user response - what never happens. From reading the Qt doc about QSession, I do not see clearly how it is supposed to work... Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx it blocks the process of saving sessions completely. Really bad. The backtrace when interrupted from inside the debugger looks like the following: Program received signal SIGINT, Interrupt. 0xe410 in ?? () No breakpoints or watchpoints. #0 0xe410 in ?? () #1 0xbfffd648 in ?? () #2 0x085193f4 in ?? () #3 0x08519270 in ?? () #4 0x40b4af9d in ___newselect_nocancel () from /lib/tls/libc.so.6 #5 0x401dee8a in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #6 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #7 0x402338bf in QApplication::enter_loop () from /usr/lib/qt3/lib/libqt-mt.so.3 #8 0x40f99bef in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #9 0x40f99edc in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #10 0x40f9a137 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #11 0x40f9a198 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #12 0x40f5f044 in initializeIntegration () from /opt/kde3/lib/kde3/plugins/integration/libqtkde.so #13 0x401bc86f in QKDEIntegration::initLibrary () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x401bc8d5 in QKDEIntegration::enabled () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x40451e95 in QMessageBox::information () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x08216e2f in prompt_pimpl ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, cancel_butto n=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert_pimpl.C:44 #17 0x0820db82 in Alert::prompt ([EMAIL PROTECTED], [EMAIL PROTECTED], default_button=0, escape_bu tton=2, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at Alert.C:44 #18 0x080bcad9 in BufferList::quitWriteBuffer (this=0x83f0ac4, buf=0x853e648) at bufferlist.C:83 #19 0x080bcca6 in BufferList::quitWriteAll (this=0x83f0ac4) at bufferlist.C:122 #20 0x08251e7e in LQApplication::commitData (this=0x83f4320, [EMAIL PROTECTED]) at lyx_gui.C:151 #21 0x401bef8c in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0x401bf061 in QSessionManager::QSessionManager () from /usr/lib/qt3/lib/libqt-mt.so.3 #23 0x4094ccc1 in _SmcProcessMessage () from /usr/X11R6/lib/libSM.so.6 #24 0x4095b26e in IceProcessMessages () from /usr/X11R6/lib/libICE.so.6 #25 0x401bf3b4 in QSmSocketReceiver::socketActivated () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x401bf425 in QSmSocketReceiver::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x40294e7e in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0x402954ad in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0x405e91f0 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3 #30 0x402b4a70 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #31 0x40231d5f in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0x40233a83 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #33 0x40225e76 in QEventLoop::activateSocketNotifiers () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0x401df242 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x40249e51 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0x40249c96 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0x4023394f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #38 0x082524a0 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at lyx_gui.C:265 #39 0x081051f0 in LyX::priv_exec (this=0x8426ce8, [EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:28 6 #40 0x08104931 in LyX::exec ([EMAIL PROTECTED], argv=0xbfffe8f4) at lyx_main.C:143 #41 0x08064437 in main (argc=1, argv=0xbfffe8f4) at main.C:47
Re: bug 1656
Stephan Witt wrote: Jean-Marc Lasgouttes wrote: Last weekend I did some further investigation. 1. Checking the behaviour of kwrite it opens a question box to save the changes when it gets the focus... Hm... when it is iconized or on another desktop it doesn't ask? Really strange. 2. Checking the patched lyx [...] It seems to be another problem with processEvents... I forgot to say it doesn't differ from unpatched lyx! Stephan --
Re: bug 1656
Jean-Marc Lasgouttes wrote: Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this Juergen patch be applied? Personally, I don't get the described Juergen patch, but Martin has confirmed that the problem is solved by Juergen the patch. The only question I have about this patch is whether we lose something when the session is closed while LyX is running and there are unsaved files. What happens with or without the patch? Hi JMarc, as promised yesterday I did some testing today. The results are disappointing... I cannot reproduce the crash on gnome-save-session anymore. But I online-updated my system since then and I did an cvs-update too. I'm sure that my qt-libraries were changed by the online-updates. What the cvs-update did... I guess it has not changed the situation regarding this bug. With the patch the unsaved changes remains unsaved. Without the patch I was asked to save the changes. So far seems all well, but after playing a while with gnome-save-session I now have the same behaviour as in Paris, the qt-library is unable to open the question box anymore! Even worse, I have to kill the lyx process to be able to do any work. All gnome applications are locked. It seems this is caused by the running gnome-save-session which is waiting for lyx returning from user response - what never happens. Now I'm unable to do further testing. I'll do some investigation at home til Monday. Stephan
Re: bug 1656
Stephan == Stephan Witt [EMAIL PROTECTED] writes: Stephan as promised yesterday I did some testing today. Thanks. Stephan With the patch the unsaved changes remains unsaved. Without Stephan the patch I was asked to save the changes. So far seems all Stephan well, Is this really what we want?? Stephan but after playing a while with gnome-save-session I now have Stephan the same behaviour as in Paris, the qt-library is unable to Stephan open the question box anymore! Even worse, I have to kill the Stephan lyx process to be able to do any work. All gnome applications Stephan are locked. It seems this is caused by the running Stephan gnome-save-session which is waiting for lyx returning from Stephan user response - what never happens. From reading the Qt doc about QSession, I do not see clearly how it is supposed to work... JMarc
Re: bug 1656
Jean-Marc Lasgouttes wrote: "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this Juergen> patch be applied? Personally, I don't get the described Juergen> patch, but Martin has confirmed that the problem is solved by Juergen> the patch. The only question I have about this patch is whether we lose something when the session is closed while LyX is running and there are unsaved files. What happens with or without the patch? Hi JMarc, as promised yesterday I did some testing today. The results are disappointing... I cannot reproduce the crash on gnome-save-session anymore. But I online-updated my system since then and I did an cvs-update too. I'm sure that my qt-libraries were changed by the online-updates. What the cvs-update did... I guess it has not changed the situation regarding this bug. With the patch the unsaved changes remains unsaved. Without the patch I was asked to save the changes. So far seems all well, but after playing a while with gnome-save-session I now have the same behaviour as in Paris, the qt-library is unable to open the question box anymore! Even worse, I have to kill the lyx process to be able to do any work. All gnome applications are locked. It seems this is caused by the running gnome-save-session which is waiting for lyx returning from user response - what never happens. Now I'm unable to do further testing. I'll do some investigation at home til Monday. Stephan
Re: bug 1656
> "Stephan" == Stephan Witt <[EMAIL PROTECTED]> writes: Stephan> as promised yesterday I did some testing today. Thanks. Stephan> With the patch the unsaved changes remains unsaved. Without Stephan> the patch I was asked to save the changes. So far seems all Stephan> well, Is this really what we want?? Stephan> but after playing a while with gnome-save-session I now have Stephan> the same behaviour as in Paris, the qt-library is unable to Stephan> open the question box anymore! Even worse, I have to kill the Stephan> lyx process to be able to do any work. All gnome applications Stephan> are locked. It seems this is caused by the running Stephan> gnome-save-session which is waiting for lyx returning from Stephan> user response - what never happens. >From reading the Qt doc about QSession, I do not see clearly how it is supposed to work... JMarc
Re: bug 1656
Juergen Spitzmueller wrote: http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this patch be applied? Personally, I don't get the described patch, but Martin has confirmed that the problem is solved by the patch. Jürgen Just in case nobody knows... I have no karma to apply it. Stephan ---
Re: bug 1656
Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this Juergen patch be applied? Personally, I don't get the described Juergen patch, but Martin has confirmed that the problem is solved by Juergen the patch. The only question I have about this patch is whether we lose something when the session is closed while LyX is running and there are unsaved files. What happens with or without the patch? JMarc
Re: bug 1656
Jean-Marc Lasgouttes wrote: Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this Juergen patch be applied? Personally, I don't get the described Juergen patch, but Martin has confirmed that the problem is solved by Juergen the patch. The only question I have about this patch is whether we lose something when the session is closed while LyX is running and there are unsaved files. What happens with or without the patch? I'm comiling the cvs-updated 1.4.x tree now. I'll answer your question tomorrow, I hope. Stephan ---
Re: bug 1656
Juergen Spitzmueller wrote: http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this patch be applied? Personally, I don't get the described patch, but Martin has confirmed that the problem is solved by the patch. Jürgen Just in case nobody knows... I have no karma to apply it. Stephan ---
Re: bug 1656
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this Juergen> patch be applied? Personally, I don't get the described Juergen> patch, but Martin has confirmed that the problem is solved by Juergen> the patch. The only question I have about this patch is whether we lose something when the session is closed while LyX is running and there are unsaved files. What happens with or without the patch? JMarc
Re: bug 1656
Jean-Marc Lasgouttes wrote: "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> http://bugzilla.lyx.org/show_bug.cgi?id=1656 Shouldn't this Juergen> patch be applied? Personally, I don't get the described Juergen> patch, but Martin has confirmed that the problem is solved by Juergen> the patch. The only question I have about this patch is whether we lose something when the session is closed while LyX is running and there are unsaved files. What happens with or without the patch? I'm comiling the cvs-updated 1.4.x tree now. I'll answer your question tomorrow, I hope. Stephan ---
Re: [Bug 1656] command gnome-session-save kills lyx!
Hello Lars, You had a simple fix that avoids the crash, didn't you Stephan? yes I have. Yesterday I came back to Berlin and since today I'm online again... After a vacation of 2 weeks I have to do some real work. But I'll provide the patch shortly. In Paris I failed to compile the patched version because of an incomplete update or bad precompiled headers or whatever, I don't know. So I didn't check it in (with Michaels account). Now it compiles again and I send you the patch. Regards, Stephan -- Index: src/frontends/qt2/lyx_gui.C === RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/lyx_gui.C,v retrieving revision 1.86 diff -u -p -r1.86 lyx_gui.C --- src/frontends/qt2/lyx_gui.C 2005/07/16 15:55:35 1.86 +++ src/frontends/qt2/lyx_gui.C 2005/07/22 11:38:42 @@ -51,6 +51,7 @@ #endif #include qapplication.h +#include qsessionmanager.h #if QT_VERSION = 0x030100 #include qeventloop.h #endif @@ -114,6 +115,7 @@ class LQApplication : public QApplicatio public: LQApplication(int argc, char ** argv); ~LQApplication(); + void commitData(QSessionManager sm); #ifdef Q_WS_X11 bool x11EventFilter (XEvent * ev) { return lyxX11EventFilter(ev); } #endif @@ -140,6 +142,28 @@ LQApplication::~LQApplication() if (locked()) unlock(); #endif +} + + +void LQApplication::commitData(QSessionManager sm) +{ + /// Maybe someone should do something sensible here. + /// The implementation is required to avoid an application exit + /// when session state save is triggered by session manager. + /// The default implementation sends a close event to all + /// visible top level widgets when session managment allows + /// interaction. + /// + /// Following is a (currently not working) proposal... + /// The problem is a blocking application when + /// BufferList::quitWriteAll wants to open the question + /// alert message dialog. + /// Qt doesn't return from it and no box is opened. + /// if ( sm.allowsInteraction() ) { + /// if ( !bufferlist.quitWriteAll() ) { + /// sm.cancel(); + /// } + /// } }
Re: [Bug 1656] command "gnome-session-save" kills lyx!
Hello Lars, > You had a simple fix that avoids the crash, didn't you Stephan? yes I have. Yesterday I came back to Berlin and since today I'm online again... After a vacation of 2 weeks I have to do some real work. But I'll provide the patch shortly. In Paris I failed to compile the patched version because of an incomplete update or bad precompiled headers or whatever, I don't know. So I didn't check it in (with Michaels account). Now it compiles again and I send you the patch. Regards, Stephan -- Index: src/frontends/qt2/lyx_gui.C === RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/lyx_gui.C,v retrieving revision 1.86 diff -u -p -r1.86 lyx_gui.C --- src/frontends/qt2/lyx_gui.C 2005/07/16 15:55:35 1.86 +++ src/frontends/qt2/lyx_gui.C 2005/07/22 11:38:42 @@ -51,6 +51,7 @@ #endif #include +#include #if QT_VERSION >= 0x030100 #include #endif @@ -114,6 +115,7 @@ class LQApplication : public QApplicatio public: LQApplication(int & argc, char ** argv); ~LQApplication(); + void commitData(QSessionManager & sm); #ifdef Q_WS_X11 bool x11EventFilter (XEvent * ev) { return lyxX11EventFilter(ev); } #endif @@ -140,6 +142,28 @@ LQApplication::~LQApplication() if (locked()) unlock(); #endif +} + + +void LQApplication::commitData(QSessionManager & sm) +{ + /// Maybe someone should do something sensible here. + /// The implementation is required to avoid an application exit + /// when session state save is triggered by session manager. + /// The default implementation sends a close event to all + /// visible top level widgets when session managment allows + /// interaction. + /// + /// Following is a (currently not working) proposal... + /// The problem is a blocking application when + /// BufferList::quitWriteAll wants to open the question + /// alert message dialog. + /// Qt doesn't return from it and no box is opened. + /// if ( sm.allowsInteraction() ) { + /// if ( !bufferlist.quitWriteAll() ) { + /// sm.cancel(); + /// } + /// } }