Jean-Marc Lasgouttes wrote: > OK, try this new version instead. I undid the simplifications to the > code, since they were wrong %-] So now the code for > LFUN_NEXT_INSET_TOGGLE is basically moved as is to BufferView::Pimpl.
It seems to work as expected. I don't get the console output anymore, and the behaviour looks sensible. This time, I managed to reproduce the crash in gdb. It seems to be not related, but related to preview (another gcc-4.1/boost issue I suppose). Backtrace is below. > One thing I failed to do is to allow locking an outermost math inset. Did this ever work? Jürgen Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1221531984 (LWP 7170)] 0x0827aff2 in RenderPreview::imageReady (this=0x887d048, [EMAIL PROTECTED]) at /usr/include/c++/4.1.0/bits/basic_string.h:591 591 { return _M_rep()->_M_length; } (gdb) bt #0 0x0827aff2 in RenderPreview::imageReady (this=0x887d048, [EMAIL PROTECTED]) at /usr/include/c++/4.1.0/bits/basic_string.h:591 #1 0x0827c6a5 in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, RenderPreview, lyx::graphics::PreviewImage const&>, boost::_bi::list2<boost::_bi::value<RenderPreview*>, boost::arg<1> > >, void, lyx::graphics::PreviewImage const&>::invoke (function_obj_ptr= {obj_ptr = 0x88d67f8, const_obj_ptr = 0x88d67f8, func_ptr = 0x88d67f8, data = ""}, [EMAIL PROTECTED]) at ../../boost/boost/bind/mem_fn_template.hpp:149 #2 0x084d2d34 in boost::function1<void, lyx::graphics::PreviewImage const&, std::allocator<void> >::operator() (this=0x88d69d4, [EMAIL PROTECTED]) at ../../boost/boost/function/function_template.hpp:581 #3 0x084d2d8d in boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<lyx::graphics::PreviewImage const&, boost::function<void ()(lyx::graphics::PreviewImage const&), std::allocator<void> > >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) at ../../boost/boost/signals/signal_template.hpp:119 #4 0x084d350d in boost::signal1<void, lyx::graphics::PreviewImage const&, boost::last_value<void>, int, std::less<int>, boost::function<void () (lyx::graphics::PreviewImage const&), std::allocator<void> > >::operator() (this=0x87f4a9c, [EMAIL PROTECTED]) at ../../boost/boost/last_value.hpp:43 #5 0x084ce3d3 in lyx::graphics::PreviewLoader::Impl::finishedGenerating (this=0x87f4a90, pid=7203, retval=0) at PreviewLoader.C:580 #6 0x084d1242 in boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, lyx::graphics::PreviewLoader::Impl, int, int>, boost::_bi::list3<boost::_bi::value<lyx::graphics::PreviewLoader::Impl*>, boost::arg<1>, boost::arg<2> > >, void, int, int>::invoke (function_obj_ptr= {obj_ptr = 0x88dbd60, const_obj_ptr = 0x88dbd60, func_ptr = 0x88dbd60, data = "`"}, a0=7203, a1=0) at ../../boost/boost/bind/mem_fn_template.hpp:252 #7 0x084efd9b in boost::function2<void, int, int, std::allocator<void> >::operator() ( ---Type <return> to continue, or q <return> to quit--- this=0x88dbd4c, a0=7203, a1=0) at ../../boost/boost/function/function_template.hpp:581 #8 0x084f02c4 in boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound2<void>::caller<int, int, boost::function<void ()(int, int), std::allocator<void> > >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) at ../../boost/boost/signals/signal_template.hpp:119 #9 0x084f0cfd in boost::signal2<void, int, int, boost::last_value<void>, int, std::less<int>, boost::function<void ()(int, int), std::allocator<void> > >::operator() (this=0x88d9500, a1=7203, a2=0) at ../../boost/boost/last_value.hpp:43 #10 0x084ef5df in lyx::support::ForkedProcess::emitSignal (this=0x887d064) at forkedcall.C:126 #11 0x084f3a13 in lyx::support::ForkedcallsController::handleCompletedProcesses ( this=0x86943e8) at forkedcontr.C:190 #12 0x080651e0 in BufferView::Pimpl::cursorToggle (this=0x87d6e08) at BufferView_pimpl.C:733 #13 0x08072e1e in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, BufferView::Pimpl>, boost::_bi::list1<boost::_bi::value<BufferView::Pimpl*> > >, void>::invoke (function_obj_ptr= {obj_ptr = 0x87d4280, const_obj_ptr = 0x87d4280, func_ptr = 0x87d4280, data = "\200"}) at ../boost/boost/bind/mem_fn_template.hpp:45 #14 0x080788cd in boost::function0<void, std::allocator<void> >::operator() (this=0x87d426c) at ../../boost/boost/function/function_template.hpp:581 #15 0x08078914 in boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void ()(), std::allocator<void> > >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) at ../../boost/boost/signals/signal_template.hpp:119 #16 0x0807907d in boost::signal0<void, boost::last_value<void>, int, std::less<int>, boost::function<void ()(), std::allocator<void> > >::operator() (this=0x87d6e8c) at ../../boost/boost/last_value.hpp:43 #17 0x0830e141 in Timeout::emit (this=0x87d6e8c) at Timeout.C:51 #18 0x08319152 in qtTimeout::timerEvent (this=0x87d1e60) at ../../../src/frontends/Timeout.h:72 ---Type <return> to continue, or q <return> to quit--- #19 0xb7b1e892 in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #20 0xb7abfec7 in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #21 0xb7ac0c91 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0xb7ab5055 in QEventLoop::activateTimers () from /usr/lib/qt3/lib/libqt-mt.so.3 #23 0xb7a6f8a0 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #24 0xb7ad6ce8 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #25 0xb7ad6b7e in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0xb7abfa7f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x0837d779 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at lyx_gui.C:253 #28 0x08144288 in LyX::exec2 (this=0x86cd8f8, [EMAIL PROTECTED], argv=0xbffde6e4) at lyx_main.C:298 #29 0x0837e366 in lyx_gui::exec ([EMAIL PROTECTED], argv=0xbffde6e4) at lyx_gui.C:215 #30 0x081454f9 in LyX::priv_exec (this=0x86cd8f8, [EMAIL PROTECTED], argv=0xbffde6e4) at lyx_main.C:225 #31 0x08145a0a in LyX::exec ([EMAIL PROTECTED], argv=0xbffde6e4) at lyx_main.C:154 #32 0x08062768 in main (argc=1, argv=0x0) at main.C:47