Bug 336075 - restarting game while dragging a piece leads to a crash
Summary: restarting game while dragging a piece leads to a crash
Status: RESOLVED FIXED
Alias: None
Product: palapeli
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Ian Wadham
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-06-11 11:25 UTC by Martin Walch
Modified: 2017-09-09 13:49 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (5.59 KB, text/plain)
2014-06-22 02:45 UTC, Ian Wadham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Walch 2014-06-11 11:25:12 UTC
Application: palapeli (2.0)
KDE Platform Version: 4.13.1 (Compiled from sources)
Qt Version: 4.8.5
Operating System: Linux 3.15.0-gentoo-gnu x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
These steps lead to a crash:

0. Assign a shortcut to "Restart puzzle…" (e.g. F5) and make sure no dialog shows up when starting a new game.

1. run a new game
2. drag a piece
3. restart the puzzle while still holding the piece

Regarding the backtrace, this looks much like bug #312267, but I am not really sure that it is the same bug.

The crash can be reproduced every time.

-- Backtrace:
Application: Palapeli (palapeli), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f1d1d551780 (LWP 4692))]

Thread 3 (Thread 0x7f1d0ca45700 (LWP 4720)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f1d1bab2830 in wait (time=30000, this=0x1f7d2b0) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1eebcc8, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f1d1baa5f60 in QThreadPoolThread::run (this=0x225c700) at concurrent/qthreadpool.cpp:141
#4  0x00007f1d1bab2325 in QThreadPrivate::start (arg=0x225c700) at thread/qthread_unix.cpp:338
#5  0x00007f1d18ad92b2 in start_thread (arg=0x7f1d0ca45700) at pthread_create.c:309
#6  0x00007f1d1a4ba1bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f1d07fff700 (LWP 4721)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f1d1bab2830 in wait (time=30000, this=0x1f7d2b0) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1eebcc8, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f1d1baa5f60 in QThreadPoolThread::run (this=0x2195220) at concurrent/qthreadpool.cpp:141
#4  0x00007f1d1bab2325 in QThreadPrivate::start (arg=0x2195220) at thread/qthread_unix.cpp:338
#5  0x00007f1d18ad92b2 in start_thread (arg=0x7f1d07fff700) at pthread_create.c:309
#6  0x00007f1d1a4ba1bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f1d1d551780 (LWP 4692)):
[KCrash Handler]
#6  0x00007f1d1bbc7266 in QObject::disconnect (sender=sender@entry=0x236bcb0, signal=signal@entry=0x0, receiver=receiver@entry=0x2174400, method=method@entry=0x0) at kernel/qobject.cpp:2891
#7  0x0000000000442e02 in Palapeli::MovePieceInteractor::stopInteraction (this=0x2174400, event=...) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/interactors.cpp:140
#8  0x00000000004418bc in setInactive (this=0x2174410) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/interactor.cpp:122
#9  Palapeli::Interactor::setInactive (this=0x2174410) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/interactor.cpp:117
#10 0x0000000000444c10 in Palapeli::InteractorManager::handleEventCommon (this=this@entry=0x219a790, pEvent=..., interactorData=..., unhandledButtons=...) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/interactormanager.cpp:140
#11 0x0000000000445103 in Palapeli::InteractorManager::handleEvent (this=0x219a790, event=event@entry=0x7fff6c0d2660) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/interactormanager.cpp:106
#12 0x00000000004595ea in Palapeli::View::mouseMoveEvent (this=0x2123920, event=0x7fff6c0d2660) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/view.cpp:117
#13 0x00007f1d1afae125 in QWidget::event (this=this@entry=0x2123920, event=event@entry=0x7fff6c0d2660) at kernel/qwidget.cpp:8361
#14 0x00007f1d1b345928 in QFrame::event (this=0x2123920, e=0x7fff6c0d2660) at widgets/qframe.cpp:557
#15 0x00007f1d1b5655eb in QGraphicsView::viewportEvent (this=0x2123920, event=0x7fff6c0d2660) at graphicsview/qgraphicsview.cpp:2866
#16 0x00007f1d1bbb0d17 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x1eeb4a0, receiver=receiver@entry=0x20f09b0, event=event@entry=0x7fff6c0d2660) at kernel/qcoreapplication.cpp:1059
#17 0x00007f1d1af5fe4c in QApplicationPrivate::notify_helper (this=this@entry=0x1eeb4a0, receiver=receiver@entry=0x20f09b0, e=e@entry=0x7fff6c0d2660) at kernel/qapplication.cpp:4558
#18 0x00007f1d1af6309b in QApplication::notify (this=this@entry=0x7fff6c0d3990, receiver=receiver@entry=0x20f09b0, e=e@entry=0x7fff6c0d2660) at kernel/qapplication.cpp:4105
#19 0x00007f1d1c8a1016 in KApplication::notify (this=0x7fff6c0d3990, receiver=0x20f09b0, event=0x7fff6c0d2660) at /var/tmp/portage/kde-base/kdelibs-4.13.1-r1/work/kdelibs-4.13.1/kdeui/kernel/kapplication.cpp:311
#20 0x00007f1d1bbb0b9d in QCoreApplication::notifyInternal (this=0x7fff6c0d3990, receiver=receiver@entry=0x20f09b0, event=event@entry=0x7fff6c0d2660) at kernel/qcoreapplication.cpp:949
#21 0x00007f1d1af66036 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#22 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x20f09b0, event=event@entry=0x7fff6c0d2660, alienWidget=alienWidget@entry=0x20f09b0, nativeWidget=nativeWidget@entry=0x20841e0, buttonDown=buttonDown@entry=0x7f1d1ba2d208 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3173
#23 0x00007f1d1af6648b in QApplicationPrivate::sendSyntheticEnterLeave (this=<optimized out>, widget=widget@entry=0x2123920) at kernel/qapplication.cpp:3257
#24 0x00007f1d1afb1898 in QWidget::setVisible (this=0x2123920, visible=<optimized out>) at kernel/qwidget.cpp:7781
#25 0x00007f1d1af94b10 in show (this=0x2123920) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:497
#26 QStackedLayout::setCurrentIndex (this=0x1fa5ff0, index=1) at kernel/qstackedlayout.cpp:313
#27 0x00007f1d1af94cb7 in QStackedLayout::setCurrentWidget (this=<optimized out>, widget=<optimized out>) at kernel/qstackedlayout.cpp:368
#28 0x00007f1d1b3a0e76 in QStackedWidget::setCurrentWidget (this=<optimized out>, widget=<optimized out>) at widgets/qstackedwidget.cpp:295
#29 0x000000000046b83b in Palapeli::PuzzleTableWidget::reportProgress (this=0x2139d50, pieceCount=48, partCount=48) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/window/puzzletablewidget.cpp:138
#30 0x00007f1d1bbc54ba in QMetaObject::activate (sender=sender@entry=0x20386e0, m=m@entry=0x473f20 <Palapeli::GamePlay::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff6c0d2980) at kernel/qobject.cpp:3547
#31 0x0000000000434726 in Palapeli::GamePlay::reportProgress (this=this@entry=0x20386e0, _t1=48, _t2=48) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1_build/src/gameplay.moc:178
#32 0x000000000043a896 in Palapeli::GamePlay::finishLoading (this=this@entry=0x20386e0) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/gameplay.cpp:1042
#33 0x000000000043c18a in Palapeli::GamePlay::loadPiecePositions (this=0x20386e0) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/engine/gameplay.cpp:1018
#34 0x00007f1d1bbca99a in QObject::event (this=0x20386e0, e=<optimized out>) at kernel/qobject.cpp:1194
#35 0x00007f1d1af5fe7c in QApplicationPrivate::notify_helper (this=this@entry=0x1eeb4a0, receiver=receiver@entry=0x20386e0, e=e@entry=0x2417ab0) at kernel/qapplication.cpp:4562
#36 0x00007f1d1af62952 in QApplication::notify (this=this@entry=0x7fff6c0d3990, receiver=receiver@entry=0x20386e0, e=e@entry=0x2417ab0) at kernel/qapplication.cpp:3944
#37 0x00007f1d1c8a1016 in KApplication::notify (this=0x7fff6c0d3990, receiver=0x20386e0, event=0x2417ab0) at /var/tmp/portage/kde-base/kdelibs-4.13.1-r1/work/kdelibs-4.13.1/kdeui/kernel/kapplication.cpp:311
#38 0x00007f1d1bbb0b9d in QCoreApplication::notifyInternal (this=0x7fff6c0d3990, receiver=receiver@entry=0x20386e0, event=event@entry=0x2417ab0) at kernel/qcoreapplication.cpp:949
#39 0x00007f1d1bbb423c in sendEvent (event=0x2417ab0, receiver=0x20386e0) at kernel/qcoreapplication.h:231
#40 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1ec6140) at kernel/qcoreapplication.cpp:1573
#41 0x00007f1d1bbb4542 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1466
#42 0x00007f1d1bbdf4db in sendPostedEvents () at kernel/qcoreapplication.h:236
#43 postEventSourceDispatch (s=s@entry=0x1eebf70) at kernel/qeventdispatcher_glib.cpp:280
#44 0x00007f1d16e44340 in g_main_dispatch (context=0x1ee83b0) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3066
#45 g_main_context_dispatch (context=context@entry=0x1ee83b0) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3642
#46 0x00007f1d16e446a8 in g_main_context_iterate (context=context@entry=0x1ee83b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3713
#47 0x00007f1d16e44768 in g_main_context_iteration (context=0x1ee83b0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3774
#48 0x00007f1d1bbdf64a in QEventDispatcherGlib::processEvents (this=0x1ec7600, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#49 0x00007f1d1b002052 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#50 0x00007f1d1bbaf775 in QEventLoop::processEvents (this=this@entry=0x7fff6c0d3850, flags=...) at kernel/qeventloop.cpp:149
#51 0x00007f1d1bbafa26 in QEventLoop::exec (this=this@entry=0x7fff6c0d3850, flags=...) at kernel/qeventloop.cpp:204
#52 0x00007f1d1bbb4e5a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#53 0x00007f1d1af5e799 in QApplication::exec () at kernel/qapplication.cpp:3823
#54 0x000000000042918a in main (argc=1, argv=0x7fff6c0d3ad8) at /var/tmp/portage/kde-base/palapeli-4.13.1/work/palapeli-4.13.1/src/main.cpp:54

The reporter indicates this bug may be a duplicate of or related to bug 312267.

Possible duplicates by query: bug 312267.

Reported using DrKonqi
Comment 1 Jekyll Wu 2014-06-11 22:12:36 UTC

*** This bug has been marked as a duplicate of bug 312267 ***
Comment 2 Ian Wadham 2014-06-13 06:50:26 UTC
I can reproduce this bug in both KDE 4.12 and 4.13 versions of Palapeli, but not bug 312267. In both bugs, looking at the backtraces, it seems as though mouse-move events are coming in after the scene has changed and the piece that was being dragged has now gone somewhere else (i.e. it is no longer under the pointer).
Comment 3 Ian Wadham 2014-06-22 02:45:13 UTC
Created attachment 87326 [details]
New crash information added by DrKonqi

palapeli (2.0) on KDE Platform 4.13.2 using Qt 4.8.6

Palapeli 2.0, KDE 4.13, Apple OS X 10.7.5 Lion.

Same method of making Palapeli crash.

-- Backtrace (Reduced):
#4  0x0000000110f7d72d in QObject::disconnect ()
#5  0x000000010f80cf58 in Palapeli::MovePieceInteractor::stopInteraction (this=0x7fb470d22680, event=@0x0) at /kdedev/kde4.13/kdesrc/kde/kdegames/palapeli/src/engine/interactors.cpp:140
#6  0x000000010f80c21a in Palapeli::Interactor::setInactive () at /kdedev/kde4.13/kdesrc/kde/kdegames/palapeli/src/engine/interactor.h:122
#7  0x000000010f80c21a in Palapeli::Interactor::sendEvent (this=0x7fb470d22690, event=<value temporarily unavailable, due to optimizations>, 
    flags=<value temporarily unavailable, due to optimizations>) at /kdedev/kde4.13/kdesrc/kde/kdegames/palapeli/src/engine/interactor.cpp:132
#8  0x000000010f81012b in Palapeli::InteractorManager::handleEventCommon (this=<value temporarily unavailable, due to optimizations>, pEvent=@0x7fff6f3e2558, interactorData=@0x7fff6f3e2550, 
    unhandledButtons=@0x7fff6f3e2540) at /kdedev/kde4.13/kdesrc/kde/kdegames/palapeli/src/engine/interactormanager.cpp:140
Comment 4 Christoph Feck 2014-07-20 21:58:42 UTC
Ian, so should we reopen this bug?
Comment 5 Ian Wadham 2014-07-20 23:40:22 UTC
(In reply to Christoph Feck from comment #4)
> Ian, so should we reopen this bug?

Yes, please. And please disentangle it from bug 312267. It is a different bug: different primary cause, similar symptoms.

ATM I cannot work on these Palapeli piece-moving crashes, because I use Apple OS X on a MacBook Pro and have a more serious problem.

KCrash and Dr Konqi will not run on Apple OS X.

Comment 3 was one of my rare successes in getting the whole KDE 4 crash-reporting sequence to run. I have found the causes of one portability bug in KCrash and three in Dr Konqi, but there seem to be more problems in Dr K, to do with sockets, kdeinit4 and klauncher.

The reason I have not reported these bugs on BKO is that apparently I am the only KDE developer with a KDE libs 4 test setup on Apple OS X and so nobody else could respond. I post the results of my work on repository playground/base/osx-patches, see https://projects.kde.org/projects/playground/base/osx-patches/repository/revisions/master/entry/README where they are available for use by MacPorts developers and the Frameworks developers, especially in Apple OS X CI.