Peter Kümmel wrote:
Peter Kümmel wrote:
Peter Kümmel wrote:
Peter Kümmel wrote:
Bennett Helm wrote:
On Nov 18, 2006, at 12:50 PM, Abdelrazak Younes wrote:
Georg Baum wrote:
Am Freitag, 17. November 2006 21:06 schrieb Peter Kümmel:
Georg Baum wrote:
Peter Kümmel wrote:
My idea was to use some Loki code for singletons and global static
data.
I don't know Loki, so maybe I am missing something here, but I believe
that
we already have everything needed.
Yes, we have C++.
What do you mean? I believe that Loki is a well designed library of
good quality, but I do not see the problem that it might solve for
us. Our problem is that some global static objects are destructed too
late, because they need other objects. This problem can be solved
IMHO by putting these objects into the LyX singleton, so I don't see
why we need any additional code.
This is what I did. Hopefully, all crash-on-exit problems on windows
and Mac should be solved now.
Unfortunately, not. Quitting LyX on Mac gives:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000040
0x0008e0a5 in lyx::LyXServerSocket::~LyXServerSocket (this=0xe3c15f0) at
lyxsocket.C:80
80 theApp->unregisterSocketCallback(fd_);
(gdb) bt
#0 0x0008e0a5 in lyx::LyXServerSocket::~LyXServerSocket
(this=0xe3c15f0) at lyxsocket.C:80
#1 0x00664e9e in boost::checked_delete<lyx::LyXServerSocket>
(x=0xe3c15f0) at ../boost/boost/checked_delete.hpp:34
#2 0x00065f61 in lyx::LyX::quit (this=0xbffff960) at lyx_main.C:418
#3 0x00066006 in lyx::LyX::~LyX (this=0xbffff960) at lyx_main.C:176
#4 0x00002995 in main (argc=1, argv=0xbffff9ec) at main.C:48
Bennett
It looks like we rely on a Qt bug on Windows and on Linux.
Bennett could you please try the attached patch.
Hum, good catch Peter. This might well be _the_ problem.
Abdel.
Peter
------------------------------------------------------------------------
Index: src/frontends/qt4/GuiApplication.C
===================================================================
--- src/frontends/qt4/GuiApplication.C (revision 15975)
+++ src/frontends/qt4/GuiApplication.C (working copy)
@@ -158,7 +158,7 @@
primary window ... is closed.
This feature be turned off by setting quitOnLastWindowClosed to false.
*/
- setQuitOnLastWindowClosed(false);
+ //setQuitOnLastWindowClosed(false);
// this connect should not be necessary:
// we rely on a Qt bug on Windows and maybe Linux
QObject::connect(this, SIGNAL(lastWindowClosed()),