Bug 389064

Summary: Kpatience crashes in demo mode
Product: [Applications] kpat Reporter: ewetoo
Component: solverAssignee: Stephan Kulow <coolo>
Status: RESOLVED WORKSFORME    
Severity: crash CC: aacid, kde-games-bugs-null, murphy.vinny
Priority: NOR Keywords: drkonqi
Version First Reported In: 20.08   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ewetoo 2018-01-16 17:44:28 UTC
Application: kpat (3.6)

Qt Version: 5.7.1
Frameworks Version: 5.28.0
Operating System: Linux 4.9.30 x86_64
Distribution: Debian GNU/Linux 9.3 (stretch)

-- Information about the crash:
- What I was doing when the application crashed:

I was running Kpatience in demo mode after using the hint button to check that the game was solvable.

-- Backtrace:
Application: KPatience (kpat), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f864579b100 (LWP 14569))]

Thread 5 (Thread 0x7f86337fe700 (LWP 14574)):
#0  0x00007f865403b6ad in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f864db509f6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f864db50b0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8654c5406b in QEventDispatcherGlib::processEvents (this=0x7f86240008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f8654bfd9ca in QEventLoop::exec (this=this@entry=0x7f86337fdc50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007f8654a2b0f3 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007f8657dd86d5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f8654a2fda8 in QThreadPrivate::start (arg=0x7f8657e4dd60) at thread/qthread_unix.cpp:368
#8  0x00007f864f862494 in start_thread (arg=0x7f86337fe700) at pthread_create.c:333
#9  0x00007f8654044aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 4 (Thread 0x7f8633fff700 (LWP 14573)):
#0  0x00007f865403771d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f864db94d40 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f864db504be in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f864db50994 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f864db50d82 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f863ab97656 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007f864db783d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f864f862494 in start_thread (arg=0x7f8633fff700) at pthread_create.c:333
#8  0x00007f8654044aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 3 (Thread 0x7f8638ec2700 (LWP 14572)):
#0  0x00007f865403771d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f864db94d40 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f864db504be in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f864db50994 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f864db50b0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f864db50b51 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f864db783d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f864f862494 in start_thread (arg=0x7f8638ec2700) at pthread_create.c:333
#8  0x00007f8654044aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 2 (Thread 0x7f8642fa0700 (LWP 14571)):
#0  0x00007f865403b6ad in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f864cbc6150 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f864cbc7ee9 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f86450f5b69 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f8654a2fda8 in QThreadPrivate::start (arg=0x562406ee69a0) at thread/qthread_unix.cpp:368
#5  0x00007f864f862494 in start_thread (arg=0x7f8642fa0700) at pthread_create.c:333
#6  0x00007f8654044aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 1 (Thread 0x7f864579b100 (LWP 14569)):
[KCrash Handler]
#6  KCard::suit (this=this@entry=0x0) at ./libkcardgame/kcard.cpp:180
#7  0x0000562405abc6fd in YukonSolver::translateMove (this=0x562406fe5400, m=...) at ./patsolve/yukonsolver.cpp:407
#8  0x0000562405a83238 in DealerScene::chooseHint (this=0x5624074c89e0) at ./dealer.cpp:795
#9  0x0000562405a899f6 in DealerScene::demo (this=0x5624074c89e0) at ./dealer.cpp:1638
#10 0x00007f8654c2b95e in QtPrivate::QSlotObjectBase::call (a=0x7ffdfbb78850, r=0x5624074c89e0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#11 QMetaObject::activate (sender=sender@entry=0x5624074c8a50, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3723
#12 0x00007f8654c2bf07 in QMetaObject::activate (sender=sender@entry=0x5624074c8a50, m=m@entry=0x7f8654e49760 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#13 0x00007f8654ca5780 in QTimer::timeout (this=this@entry=0x5624074c8a50) at .moc/moc_qtimer.cpp:198
#14 0x00007f8654c37f78 in QTimer::timerEvent (this=0x5624074c8a50, e=<optimized out>) at kernel/qtimer.cpp:254
#15 0x00007f8654c2c453 in QObject::event (this=0x5624074c8a50, e=<optimized out>) at kernel/qobject.cpp:1285
#16 0x00007f86554e2b8c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5624074c8a50, e=0x7ffdfbb78b80) at kernel/qapplication.cpp:3799
#17 0x00007f86554ea341 in QApplication::notify (this=0x7ffdfbb78f70, receiver=0x5624074c8a50, e=0x7ffdfbb78b80) at kernel/qapplication.cpp:3556
#18 0x00007f8654bff9e0 in QCoreApplication::notifyInternal2 (receiver=0x5624074c8a50, event=event@entry=0x7ffdfbb78b80) at kernel/qcoreapplication.cpp:988
#19 0x00007f8654c52fee in QCoreApplication::sendEvent (event=0x7ffdfbb78b80, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#20 QTimerInfoList::activateTimers (this=0x562406f887c0) at kernel/qtimerinfo_unix.cpp:644
#21 0x00007f8654c53549 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#22 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:229
#23 0x00007f864db507f7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f864db50a60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f864db50b0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007f8654c5404f in QEventDispatcherGlib::processEvents (this=0x562406f885a0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#27 0x00007f8654bfd9ca in QEventLoop::exec (this=this@entry=0x7ffdfbb78dd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#28 0x00007f8654c0613c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#29 0x0000562405a7a2fb in main (argc=<optimized out>, argv=<optimized out>) at ./main.cpp:339

Reported using DrKonqi
Comment 1 Albert Astals Cid 2018-01-16 21:36:49 UTC
Is this something you can reproduce or did it just crash once?
Comment 2 ewetoo 2018-01-16 23:34:29 UTC
(In reply to Albert Astals Cid from comment #1)
> Is this something you can reproduce or did it just crash once?

It was just the one crash, I suspect it's one of those rare race conditions with threads that can't be 100% reproducible anyway, but it was sufficiently unusual to note.
Comment 3 Albert Astals Cid 2018-01-17 20:11:10 UTC
Unfortunately I don't know enough about the yukon solver code to be able to provide a fix just by looking at the crash data.

Fortunately seems the crash doesn't happen very often so it's not that terrible.
Comment 4 Justin Zobel 2020-12-17 05:33:57 UTC
Thank you for the crash report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 5 ewetoo 2020-12-17 07:52:04 UTC
Hi, thanks for bringing this to my attention. I've updated the report to cover the nearest current version (mine is 20.08.3) of Debian testing and specified that the error is likely to be a lockup related to the solver. The program is occasionally completely locking up and either crashes by itself or the system offers to terminate it after no response. I am not seeing anything much different in the backtraces and the crashes are still sporadic so it is still difficult to pin down the cause but it is still happening during the klondike and yukon games which are the major games I play.
Comment 6 Albert Astals Cid 2020-12-17 18:05:52 UTC
Can you try the new version from https://flathub.org/apps/details/org.kde.kpat ?
Comment 7 Bug Janitor Service 2021-01-01 04:37:56 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2021-01-16 04:36:50 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!