Abdelrazak Younes wrote: > Georg Baum wrote: >> Am Donnerstag, 12. Oktober 2006 19:50 schrieb Enrico Forestieri: >>> Yes, with this patch LyX builds, but then is quite unstable. >>> I always get a crash when trying to load a particular document >>> (see bt1.txt), but some others load fine. However, when I load >>> Intro.lyx and then quit, it crashes again (bt2.txt). >>> With another document it crashes while scrolling (bt3.txt). >> >> I doubt that it has anything to do with the streams. I do get a crash >> immediately on startup. This is no wonder, since Abdel thought that >> non-windows users do not really need an Application instance but can do >> with a pointer to an alrerady destroyed variable :-( > > Year sorry. Maybe the static trick will work fine under Linux also?
No. Don't you remember how much we tried out? Unfortunately the current solution brings a new problem: qt3 prints a QThreadStorage: thread 40c9a940 exited after QThreadStorage destroyed after quit, and qt4 segfaults after quit. Backtrace: #0 0x406fbd11 in QAbstractEventDispatcher::instance () from /usr/lib/libQtCore.so.4 #1 0x4071ca0c in QSocketNotifier::setEnabled () from /usr/lib/libQtCore.so.4 #2 0x4071cc86 in QSocketNotifier::~QSocketNotifier () from /usr/lib/libQtCore.so.4 #3 0x0847c058 in boost::checked_delete<QSocketNotifier> () #4 0x0847be33 in boost::scoped_ptr<QSocketNotifier>::~scoped_ptr () #5 0x0847bfe6 in socket_callback::~socket_callback () #6 0x0834f274 in boost::checked_delete<socket_callback> () #7 0x08350412 in boost::detail::sp_counted_impl_p<socket_callback>::dispose () #8 0x0808a81b in boost::detail::sp_counted_base::release () #9 0x0808a7e5 in boost::detail::shared_count::~shared_count () #10 0x0834daf3 in boost::shared_ptr<socket_callback>::~shared_ptr () #11 0x0834fa25 in std::pair<int const, boost::shared_ptr<socket_callback> >::~pair () #12 0x083502d7 in std::_Destroy<std::pair<int const, boost::shared_ptr<socket_callback> > > () #13 0x0834f28f in std::_Rb_tree<int, std::pair<int const, boost::shared_ptr<socket_callback> >, std::_Select1st<std::pair<int const, boost::shared_ptr<socket_callback> > >, std::less<int>, std::allocator<std::pair<int const, boost::shared_ptr<socket_callback> > > >::destroy_node () #14 0x0834e466 in std::_Rb_tree<int, std::pair<int const, boost::shared_ptr<socket_callback> >, std::_Select1st<std::pair<int const, boost::shared_ptr<socket_callback> > >, std::less<int>, std::allocator<std::pair<int const, boost::shared_ptr<socket_callback> > > >::_M_erase () #15 0x0834dbe2 in std::_Rb_tree<int, std::pair<int const, boost::shared_ptr<socket_callback> >, std::_Select1st<std::pair<int const, boost::shared_ptr<socket_callback> > >, std::less<int>, std::allocator<std::pair<int const, boost::shared_ptr<socket_callback> > > >::clear () #16 0x0834db20 in std::_Rb_tree<int, std::pair<int const, boost::shared_ptr<socket_callback> >, std::_Select1st<std::pair<int const, boost::shared_ptr<socket_callback> > >, std::less<int>, std::allocator<std::pair<int const, boost::shared_ptr<socket_callback> > > >::~_Rb_tree () #17 0x0834db09 in std::map<int, boost::shared_ptr<socket_callback>, std::less<int>, std::allocator<std::pair<int const, boost::shared_ptr<socket_callback> > > >::~map () #18 0x0834de13 in lyx::frontend::GuiApplication::~GuiApplication () #19 0x0817a21c in boost::checked_delete<lyx::frontend::Application> () #20 0x081780d7 in boost::scoped_ptr<lyx::frontend::Application>::~scoped_ptr () #21 0x0817b5ae in LyX::~LyX () #22 0x0817b109 in boost::checked_delete<LyX> () #23 0x08178989 in boost::scoped_ptr<LyX>::~scoped_ptr () I am not amused that you simply throw away the hard work several of us did to circumvent that dreaded mutex destroy failure message on linux and crashes on OS X. I don't have the time to do this work again, so please use the previous results (see the comment in src/lyx_main.h) and create something that works. Cleanup is good, and I know why you do that, but please don't break previously working solutions. Georg
