Bennett Helm wrote:
> 1.5.0 alpha crashes every time on quit on Intel Mac. Here's the backtrace:
> 
> Program received signal SIGABRT, Aborted.
> 0x9003d1dc in kill ()
> (gdb) bt
> #0  0x9003d1dc in kill ()
> #1  0x9010f2af in raise ()
> #2  0x9010de02 in abort ()
> #3  0x90b4039c in __gnu_cxx::__verbose_terminate_handler ()
> #4  0x90b3e602 in __gxx_personality_v0 ()
> #5  0x90b3e640 in std::terminate ()
> #6  0x90b3ea93 in __cxa_pure_virtual ()

Maybe it is a variation of this problem:

"You probably already know that this error is caused by calling pure
virtual methods from the constructor or destructor of the base class.
It must be an indirect call, because GCC will issue an error about
direct calls. "

So, does the attached patch help?

> #7  0x0008f5de in lyx::LyXServerSocket::~LyXServerSocket
> (this=0xe3be3d0) at lyxsocket.C:80
> #8  0x0066d27a in boost::checked_delete<lyx::LyXServerSocket>
> (x=0xe3be3d0) at ../boost/boost/checked_delete.hpp:34
> #9  0x0066ef11 in lyx::LyX::Singletons::~Singletons (this=0xe317860) at
> ../boost/boost/scoped_ptr.hpp:77
> #10 0x0066efaa in boost::checked_delete<lyx::LyX::Singletons>
> (x=0xe317860) at ../boost/boost/checked_delete.hpp:34
> #11 0x0066efd6 in lyx::LyX::~LyX (this=0xe317850) at
> ../boost/boost/scoped_ptr.hpp:77
> #12 0x0066f01a in boost::checked_delete<lyx::LyX> (x=0xe317850) at
> ../boost/boost/checked_delete.hpp:34
> #13 0x0006466b in __static_initialization_and_destruction_0
> (__initialize_p=0, __priority=-1878797860) at
> ../boost/boost/scoped_ptr.hpp:77
> #14 0x8fe0e32d in
> __dyld__ZN16ImageLoaderMachO13doTerminationERKN11ImageLoader11LinkContextE
> ()
> #15 0x8fe030ec in __dyld__ZN4dyld14runTerminatorsEv ()
> #16 0x9000ff5c in __cxa_finalize ()
> #17 0x9000fe58 in exit ()
> #18 0x00001f0e in _start (argc=1, argv=0xbffffa04, envp=0xbffffa0c) at
> /SourceCache/Csu/Csu-58/crt.c:272
> #19 0x00001e21 in start ()
> 
> Bennett
> 
> 


-- 
Peter Kümmel
Index: src/frontends/Application.h
===================================================================
--- src/frontends/Application.h (revision 15934)
+++ src/frontends/Application.h (working copy)
@@ -108,7 +108,7 @@
        * remove a I/O read callback
        * @param fd socket descriptor (file/socket/etc)
        */
-       virtual void unregisterSocketCallback(int fd) = 0;
+       void unregisterSocketCallback(int fd);
 
        /// Create the main window with given geometry settings.
        LyXView & createView(unsigned int width, unsigned int height,
@@ -128,6 +128,10 @@
        /// Events
        LyXView * current_view_;
 
+       // don't call pure virtual functions in the ctor/dtor directly
+       // MAC GCC doesn't like it
+       virtual void unregisterSocketCallback_impl(int fd) = 0;
+
 }; // Application
 
 } // namespace frontend
Index: src/frontends/qt4/GuiApplication.C
===================================================================
--- src/frontends/qt4/GuiApplication.C  (revision 15934)
+++ src/frontends/qt4/GuiApplication.C  (working copy)
@@ -274,7 +274,7 @@
 }
 
 
-void GuiApplication::unregisterSocketCallback(int fd)
+void GuiApplication::unregisterSocketCallback_impl(int fd)
 {
        socket_callbacks_.erase(fd);
 }
Index: src/frontends/qt4/GuiApplication.h
===================================================================
--- src/frontends/qt4/GuiApplication.h  (revision 15934)
+++ src/frontends/qt4/GuiApplication.h  (working copy)
@@ -74,7 +74,7 @@
        virtual void updateColor(LColor_color col);
        virtual void registerSocketCallback(
                int fd, boost::function<void()> func);
-       virtual void unregisterSocketCallback(int fd);
+       virtual void unregisterSocketCallback_impl(int fd);
        //@}
 
        ///

Reply via email to