Review Request 114578: Fix crash in SnapGuideDocker
Elvis Stansvik
elvstone at gmail.com
Fri Dec 20 21:59:58 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114578/
-----------------------------------------------------------
Review request for Calligra.
Repository: calligra
Description
-------
Karbon currently crashes for me upon exit with the following backtrace:
Application: Karbon (karbon), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9354d3b7c0 (LWP 8743))]
Thread 2 (Thread 0x7f93383e9700 (LWP 8747)):
#0 0x00007f934e34f9dd in poll () from /usr/lib/libc.so.6
#1 0x00007f934968e584 in ?? () from /usr/lib/libglib-2.0.so.0
#2 0x00007f934968e68c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3 0x00007f934f200b46 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4 0x00007f934f1d2b1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5 0x00007f934f1d2e15 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6 0x00007f934f0d16ef in QThread::exec() () from /usr/lib/libQtCore.so.4
#7 0x00007f934f1b42c3 in ?? () from /usr/lib/libQtCore.so.4
#8 0x00007f934f0d3d8f in ?? () from /usr/lib/libQtCore.so.4
#9 0x00007f934ee430a2 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007f934e35849d in clone () from /usr/lib/libc.so.6
Thread 1 (Thread 0x7f9354d3b7c0 (LWP 8743)):
[KCrash Handler]
#5 0x00007f935352739c in QFlags<KoSnapGuide::Strategy>::QFlags (this=0x7fff2ed4be70, f=...) at /usr/include/qt4/QtCore/qglobal.h:2311
#6 0x00007f935352683f in KoSnapGuide::enabledSnapStrategies (this=0x152b5f0) at /home/estan/kde4/src/calligra/libs/flake/KoSnapGuide.cpp:98
#7 0x00007f935352f18c in SnapGuideConfigWidget::updateControls (this=0x5beaa30) at /home/estan/kde4/src/calligra/libs/flake/SnapGuideConfigWidget.cpp:94
#8 0x00007f935352f346 in SnapGuideConfigWidget::showEvent (this=0x5beaa30, event=0x7fff2ed4c260) at /home/estan/kde4/src/calligra/libs/flake/SnapGuideConfigWidget.cpp:109
#9 0x00007f93500f53c9 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#10 0x00007f93500a60dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#11 0x00007f93500ac6a0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x00007f935412f358 in KoApplication::notify (this=0x7fff2ed4cf30, receiver=0x5beaa30, event=0x7fff2ed4c260) at /home/estan/kde4/src/calligra/libs/main/KoApplication.cpp:554
#13 0x00007f934f1d3ebd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#14 0x00007f93500f2b1f in QWidgetPrivate::show_helper() () from /usr/lib/libQtGui.so.4
#15 0x00007f93500f298a in QWidgetPrivate::showChildren(bool) () from /usr/lib/libQtGui.so.4
#16 0x00007f93500f2a1f in QWidgetPrivate::show_helper() () from /usr/lib/libQtGui.so.4
#17 0x00007f93500f47d4 in QWidget::setVisible(bool) () from /usr/lib/libQtGui.so.4
#18 0x00007f935416f484 in KoMainWindow::closeEvent (this=0x173fd80, e=0x7fff2ed4c870) at /home/estan/kde4/src/calligra/libs/main/KoMainWindow.cpp:1160
#19 0x00007f93500f522e in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007f93504ab2d3 in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007f9350eb1d79 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#22 0x00007f93500a60dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007f93500ac6a0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00007f935412f358 in KoApplication::notify (this=0x7fff2ed4cf30, receiver=0x173fd80, event=0x7fff2ed4c870) at /home/estan/kde4/src/calligra/libs/main/KoApplication.cpp:554
#25 0x00007f934f1d3ebd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#26 0x00007f93500f1a89 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () from /usr/lib/libQtGui.so.4
#27 0x00007f935010fa82 in QApplication::x11ClientMessage(QWidget*, _XEvent*, bool) () from /usr/lib/libQtGui.so.4
#28 0x00007f935011ca5f in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#29 0x00007f9350143162 in ?? () from /usr/lib/libQtGui.so.4
#30 0x00007f934968e296 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0x00007f934968e5e8 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0x00007f934968e68c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0x00007f934f200b25 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0x00007f9350143216 in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007f934f1d2b1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007f934f1d2e15 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#37 0x00007f934f1d7f4b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#38 0x00007f935492d076 in kdemain (argc=1, argv=0x7fff2ed4d148) at /home/estan/kde4/src/calligra/karbon/main.cpp:80
#39 0x00000000004009b2 in main (argc=1, argv=0x7fff2ed4d148) at /home/estan/kde4/build/calligra/karbon/karbon_dummy.cpp:3
The attached patch fixes the issue, and at least intuitively makes sense to me: It makes SnapGuideDocker::unsetCanvas() symmetric to SnapGuideDocker::setCanvas(KoCanvasBase *canvas). But I would like someone who is familiar with this code to comment.
Diffs
-----
plugins/dockers/snapguidedocker/SnapGuideDocker.cpp f0950a9
Diff: http://git.reviewboard.kde.org/r/114578/diff/
Testing
-------
Launched Karbon, created a new document. Without the patch, Karbon crashes on exit. With it, all is fine.
Thanks,
Elvis Stansvik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20131220/8b367655/attachment.htm>
More information about the calligra-devel
mailing list