On 01/26/2017 01:03 PM, Kornel Benko wrote:
> Am Donnerstag, 26. Januar 2017 um 12:12:13, schrieb Richard Heck 
> <rgh...@lyx.org>
>> On 01/26/2017 04:11 AM, Kornel Benko wrote:
>>> Master branch
>>>
>>> Steps to reproduce
>>> 1.) File->New from template...
>>> 2.) Insert some text in the row above 'D-PLZ Stadt'
>>> 3.) File->Save as ...
>>>     crash
>> Can't reproduce either.
>>
>> Richard
> Weird. I try to provide backtrace. Remark: If I use 'save as' as the first 
> action after
> loading the template, I do not see the crash anymore.

This looks familiar. There was a crash a month or two ago, maybe, that
also happened during reload (see #9 below) due to invalid cursors.
Guillaume, I think you were the one who fixed that other problem?

Richard



> ...
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000c88648 in lyx::DocIterator::inMathed (this=0x2d343c8)
>     at /usr2/src/lyx/lyx-git/src/DocIterator.h:140
> 140           { return !empty() && inset().inMathed(); }
> (gdb)  p inset()
> $1 = (lyx::Inset &) @0x2d98390: {
>   _vptr.Inset = 0x6800000054, 
>   buffer_ = 0x2000000065
> }
> (gdb) p *this
> $2 = {
>   boundary_ = false, 
>   slices_ = {
>     <std::_Vector_base<lyx::CursorSlice, std::allocator<lyx::CursorSlice> >> 
> = {
>       _M_impl = {
>         <std::allocator<lyx::CursorSlice>> = {
>           <__gnu_cxx::new_allocator<lyx::CursorSlice>> = {<No data fields>}, 
> <No data fields>}, 
>         members of std::_Vector_base<lyx::CursorSlice, 
> std::allocator<lyx::CursorSlice> >::_Vector_impl: 
>         _M_start = 0x2f984b0, 
>         _M_finish = 0x2f98530, 
>         _M_end_of_storage = 0x2f98530
>       }
>     }, <No data fields>}, 
>   inset_ = 0x2f5ec90, 
>   buffer_ = 0x2d0fc60
> }
> (gdb) bt
> #0  0x0000000000c88648 in lyx::DocIterator::inMathed (this=0x2d343c8)
>     at /usr2/src/lyx/lyx-git/src/DocIterator.h:140
> #1  0x0000000000cf7442 in lyx::DocIterator::lastpos (this=0x2d343c8)
>     at /usr2/src/lyx/lyx-git/src/DocIterator.cpp:255
> #2  0x0000000000cdaaf6 in lyx::Cursor::checkNewWordPosition (this=0x2d34278)
>     at /usr2/src/lyx/lyx-git/src/Cursor.cpp:531
> #3  0x0000000000cda75f in lyx::Cursor::resetAnchor (this=0x2d34278)
>     at /usr2/src/lyx/lyx-git/src/Cursor.cpp:489
> #4  0x0000000000ce28b1 in lyx::Cursor::sanitize (this=0x2d34278)
>     at /usr2/src/lyx/lyx-git/src/Cursor.cpp:2251
> #5  0x0000000001104a33 in lyx::frontend::GuiView::structureChanged 
> (this=0x23091d0)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiView.cpp:1658
> #6  0x0000000000c03ca1 in lyx::Buffer::structureChanged (this=0x2d0fc60)
>     at /usr2/src/lyx/lyx-git/src/Buffer.cpp:3950
> #7  0x0000000000c09b0b in lyx::Buffer::updateBuffer (this=0x2d0fc60, 
>     scope=lyx::Buffer::UpdateMaster, utype=lyx::InternalUpdate)
>     at /usr2/src/lyx/lyx-git/src/Buffer.cpp:4745
> #8  0x0000000000c0cc30 in lyx::Buffer::updateBuffer (this=0x2d0fc60)
>     at /usr2/src/lyx/lyx-git/src/Buffer.h:736
> #9  0x0000000000c0b6f7 in lyx::Buffer::reload (this=0x2d0fc60)
>     at /usr2/src/lyx/lyx-git/src/Buffer.cpp:5137
> #10 0x000000000110c3df in lyx::frontend::GuiView::renameBuffer 
> (this=0x23091d0, b=..., 
>     newname=..., kind=lyx::frontend::GuiView::LV_WRITE_AS)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiView.cpp:2569
> #11 0x0000000001115785 in lyx::frontend::GuiView::dispatch (this=0x23091d0, 
> cmd=..., dr=...)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiView.cpp:3749
> #12 0x00000000010ca8ce in lyx::frontend::GuiApplication::dispatch 
> (this=0x1f47c80, cmd=..., dr=...)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiApplication.cpp:2081
> #13 0x00000000010c68b2 in lyx::frontend::GuiApplication::dispatch 
> (this=0x1f47c80, cmd=...)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiApplication.cpp:1400
> #14 0x0000000000da42b2 in lyx::dispatch (action=...) at 
> /usr2/src/lyx/lyx-git/src/LyX.cpp:1449
> #15 0x000000000117aa3a in lyx::frontend::Action::action (this=0x25629d0)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/Action.cpp:87
> #16 0x000000000117aab3 in lyx::frontend::Action::qt_static_metacall 
> (_o=0x25629d0, 
>     _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffffffccb0)
>     at 
> /BUILD/BUILDMint17/BuildLyxGitQt5.7main-gcc6.2/src/frontends/qt4/moc_Action.cpp:79
> #17 0x00007ffff56c5056 in QMetaObject::activate(QObject*, int, int, void**) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Core.so.5
> #18 0x00007ffff643c7b2 in QAction::triggered(bool) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #19 0x00007ffff643f18d in QAction::activate(QAction::ActionEvent) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #20 0x00007ffff65a4faa in ?? () from 
> /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #21 0x00007ffff65a9964 in ?? () from 
> /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #22 0x00007ffff65ad7c6 in QMenu::mouseReleaseEvent(QMouseEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #23 0x00007ffff6488b78 in QWidget::event(QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #24 0x00007ffff65ae1cb in QMenu::event(QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #25 0x00007ffff644352c in QApplicationPrivate::notify_helper(QObject*, 
> QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #26 0x00007ffff644a808 in QApplication::notify(QObject*, QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #27 0x00000000010ce68d in lyx::frontend::GuiApplication::notify 
> (this=0x1f47c80, 
>     receiver=0x25af2d0, event=0x7fffffffd4c0)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiApplication.cpp:2702
> #28 0x00007ffff569dae0 in QCoreApplication::notifyInternal2(QObject*, 
> QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Core.so.5
> #29 0x00007ffff64497bf in QApplicationPrivate::sendMouseEvent(QWidget*, 
> QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #30 0x00007ffff64a45fb in ?? () from 
> /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #31 0x00007ffff64a6513 in ?? () from 
> /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #32 0x00007ffff644352c in QApplicationPrivate::notify_helper(QObject*, 
> QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #33 0x00007ffff644a220 in QApplication::notify(QObject*, QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Widgets.so.5
> #34 0x00000000010ce68d in lyx::frontend::GuiApplication::notify 
> (this=0x1f47c80, 
>     receiver=0x2d21380, event=0x7fffffffdae0)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiApplication.cpp:2702
> #35 0x00007ffff569dae0 in QCoreApplication::notifyInternal2(QObject*, 
> QEvent*) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Core.so.5
> #36 0x00007ffff5c408db in 
> QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)
>  () from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Gui.so.5
> #37 0x00007ffff5c42745 in 
> QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
>  () from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Gui.so.5
> #38 0x00007ffff5c23e73 in 
> QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
>  () from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Gui.so.5
> #39 0x00007fffeea7e080 in ?? ()
>    from 
> /BUILD/BUILDMint17/BuildQt5.7main/5.7/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
> #40 0x00007ffff3632e04 in g_main_context_dispatch () from 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #41 0x00007ffff3633048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #42 0x00007ffff36330ec in g_main_context_iteration () from 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #43 0x00007ffff56eb047 in 
> QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () 
> from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Core.so.5
> #44 0x00007ffff569bdca in 
> QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Core.so.5
> #45 0x00007ffff56a3bad in QCoreApplication::exec() ()
>    from /usr/BUILD/BuildQt5/5.7/gcc_64/lib/libQt5Core.so.5
> #46 0x00000000010ccdf7 in lyx::frontend::GuiApplication::exec (this=0x1f47c80)
>     at /usr2/src/lyx/lyx-git/src/frontends/qt4/GuiApplication.cpp:2468
> #47 0x0000000000d9bada in lyx::LyX::exec (this=0x7fffffffe100, 
> argc=@0x7fffffffe0fc: 1, 
>     argv=0x7fffffffe208) at /usr2/src/lyx/lyx-git/src/LyX.cpp:391
> #48 0x0000000000eafa52 in main (argc=1, argv=0x7fffffffe208)
>     at /usr2/src/lyx/lyx-git/src/main.cpp:42
> ......................................
> For me it looks like some not initialized variable, since the value of
> pointer in inset(), 0x6800000054, seems to be wrong. Same for buffer, 
> 0x2000000065
> (gdb) x/5s 0x6800000054
> 0x6800000054: <error: Cannot access memory at address 0x6800000054>
> 0x6800000054: <error: Cannot access memory at address 0x6800000054>
> 0x6800000054: <error: Cannot access memory at address 0x6800000054>
> 0x6800000054: <error: Cannot access memory at address 0x6800000054>
> 0x6800000054: <error: Cannot access memory at address 0x6800000054>
>
> (gdb) x/5s 0x2000000065
> 0x2000000065: <error: Cannot access memory at address 0x2000000065>
> 0x2000000065: <error: Cannot access memory at address 0x2000000065>
> 0x2000000065: <error: Cannot access memory at address 0x2000000065>
> 0x2000000065: <error: Cannot access memory at address 0x2000000065>
> 0x2000000065: <error: Cannot access memory at address 0x2000000065>
>
>
>       Kornel
>

Reply via email to