Bug 474349 - Ksirk crashes in Ksirk::GameLogic::AIPlayer::~AIPlayer
Summary: Ksirk crashes in Ksirk::GameLogic::AIPlayer::~AIPlayer
Status: RESOLVED WORKSFORME
Alias: None
Product: ksirk
Classification: Applications
Component: general (other bugs)
Version First Reported In: 21.12.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Nemanja Hirsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-10 01:27 UTC by Doug Forguson
Modified: 2023-10-12 03:46 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Forguson 2023-09-10 01:27:07 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
Running on Ubuntu studio 22.04 with xfce desktop. Note I also saw this issue when using the default kde plasma desktop.

STEPS TO REPRODUCE
1. Launch ksirk application
2. Run as normal and app will frequently crash.
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: NA
macOS: NA
Linux/KDE Plasma:  Witnessed this under plasma and xfce desktop.
(available in About System)
KDE Plasma Version: ???
KDE Frameworks Version: 
Qt Version: 

Ran ksirk from gdb and captured the below stack trace. Never did get the kde auto report tool to work. Always said it couldn't capture a backtrace even when I launched using gdb.

ADDITIONAL INFORMATION

Thread 1 "ksirk" received signal SIGSEGV, Segmentation fault.
0x00007ffff5d57c5d in __pthread_cancel (th=140736290416192) at ./nptl/pthread_cancel.c:64
Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_cancel.c.
64      ./nptl/pthread_cancel.c: No such file or directory.

(gdb) backtrace
#0  0x00007ffff5d57c5d in __pthread_cancel (th=140736290416192) at ./nptl/pthread_cancel.c:64
#1  0x00007ffff62078c9 in QThread::terminate() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00005555555faff7 in Ksirk::GameLogic::AIPlayer::~AIPlayer (this=<optimized out>, this=<optimized out>)
    at ./ksirk/GameLogic/aiplayer.cpp:84
#3  0x00005555555e7b8d in Ksirk::GameLogic::AIColsonPlayer::~AIColsonPlayer (this=<optimized out>, this=<optimized out>)
    at ./ksirk/GameLogic/aiColsonPlayer.cpp:69
#4  0x00005555555c2aae in Ksirk::KGameWindow::attackEnd (this=0x5555559492a0) at ./ksirk/kgamewin.cpp:833
#5  0x00005555555b08bf in Ksirk::KGameWindow::terminateAttackSequence (this=0x5555559492a0) at ./ksirk/kgamewin.cpp:1901
#6  Ksirk::GameLogic::GameAutomaton::slotNetworkData (this=0x55555592ec40, msgid=<optimized out>, buffer=..., receiver=0, 
    sender=1) at ./ksirk/GameLogic/gameautomaton.cpp:2145
#7  0x00007ffff642c793 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff7d02087 in KGame::signalNetworkData (this=this@entry=0x55555592ec40, _t1=<optimized out>, _t1@entry=275, 
    _t2=..., _t3=<optimized out>, _t3@entry=0, _t4=<optimized out>, _t4@entry=1)
    at ./obj-x86_64-linux-gnu/src/private/KF5KDEGamesPrivate_autogen/BQQKSAKFSH/moc_kgame.cpp:417
#9  0x00007ffff7d17dc8 in KGame::networkTransmission (this=0x55555592ec40, stream=..., msgid=531, receiver=0, sender=1)
    at ./src/private/kgame/kgame.cpp:1066
#10 0x00007ffff7d1e82c in KGameNetwork::receiveNetworkTransmission (this=0x55555592ec40, receiveBuffer=..., clientID=1)
    at ./src/private/kgame/kgamenetwork.cpp:482
#11 0x00007ffff642c793 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff7d02247 in KMessageClient::broadcastReceived (this=this@entry=0x555555967750, _t1=..., _t2=<optimized out>, 
    _t2@entry=1) at ./obj-x86_64-linux-gnu/src/private/KF5KDEGamesPrivate_autogen/BQQKSAKFSH/moc_kmessageclient.cpp:258
#13 0x00007ffff7d2943e in KMessageClient::processMessage (this=0x555555967750, msg=...)
    at ./src/private/kgame/kmessageclient.cpp:212
#14 0x00007ffff642c793 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff7d01f76 in KMessageIO::received (this=<optimized out>, _t1=...)
    at ./obj-x86_64-linux-gnu/src/private/KF5KDEGamesPrivate_autogen/BQQKSAKFSH/moc_kmessageio.cpp:152
#16 0x00007ffff7d2d0ea in KMessageServer::broadcastMessage (this=0x5555558c4780, msg=...)
    at ./src/private/kgame/kmessageserver.cpp:340
#17 0x00007ffff7d2fdc6 in KMessageServer::processOneMessage (this=0x5555558c4780)
    at ./src/private/kgame/kmessageserver.cpp:416
--Type <RET> for more, q to quit, c to continue without paging--
#18 0x00007ffff642c793 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff64307fe in QTimer::timeout(QTimer::QPrivateSignal) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff642233f in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff6fc2713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff63f4e3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff644d3eb in QTimerInfoList::activateTimers() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff644dd34 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ffff404fd3b in g_main_dispatch (context=0x7fffe8005010) at ../../../glib/gmain.c:3419
#26 g_main_context_dispatch (context=0x7fffe8005010) at ../../../glib/gmain.c:4137
#27 0x00007ffff40a5258 in g_main_context_iterate.constprop.0 (context=context@entry=0x7fffe8005010, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4213
#28 0x00007ffff404d3e3 in g_main_context_iteration (context=0x7fffe8005010, may_block=1) at ../../../glib/gmain.c:4278
#29 0x00007ffff644e0b8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff63f375b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff63fbcf4 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00005555555915b2 in main (argc=<optimized out>, argv=<optimized out>) at ./ksirk/main.cpp:83
(gdb) continue
Continuing.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = ksirk path = /usr/games pid = 121216
KCrash: Arguments: /usr/games/ksirk 
[Thread 0x7fff62ffd640 (LWP 124174) exited]
[Thread 0x7ffff0318640 (LWP 121219) exited]
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
[Detaching after fork from child process 124233]

Thread 1 "ksirk" received signal SIGSTOP, Stopped (signal).
0x00007ffff5dddd7f in __GI___poll (fds=fds@entry=0x7fffffffbf90, nfds=nfds@entry=1, timeout=timeout@entry=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
Download failed: Invalid argument.  Continuing without source file ./io/../sysdeps/unix/sysv/linux/poll.c.
29      ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb) Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
warning: process 121216 is already traced by process 117517
ptrace: Operation not permitted.
/tmp/drkonqi.BaSokU:1: Error in sourced command file:
No thread selected
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
warning: process 121216 is already traced by process 117517
ptrace: Operation not permitted.
/tmp/drkonqi.Czikwc:1: Error in sourced command file:
No thread selected
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
warning: process 121216 is already traced by process 117517
ptrace: Operation not permitted.
/tmp/drkonqi.AmoMVW:1: Error in sourced command file:
No thread selected
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
warning: process 121216 is already traced by process 117517
ptrace: Operation not permitted.
/tmp/drkonqi.LQSTNU:1: Error in sourced command file:
No thread selected
Opening in existing browser session.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
Comment 1 Nate Graham 2023-09-11 19:04:21 UTC
22.04 ships the quite-outdated version 21.12 version of KSirk which is almost two years old, and as such, out of support from KDE. Any chance you can upgrade to 23.04 or 23.08 and try again? Thanks!
Comment 2 Doug Forguson 2023-09-11 22:19:39 UTC
Hi Nate,

Can you provide some guidance on the best way to get a valid package 
with one of these versions? Do I need to DL source and build or is there 
a package I can get somewhere?

Thanks,

Doug

On 9/11/23 14:04, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=474349
>
> Nate Graham <nate@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Product|kde                         |ksirk
>               Status|REPORTED                    |NEEDSINFO
>                   CC|                            |kde-games-bugs@kde.org,
>                     |                            |nate@kde.org
>             Assignee|unassigned-bugs@kde.org     |nemhirsl@gmail.com
>           Resolution|---                         |WAITINGFORINFO
>              Summary|Ksirk crashes with a        |Ksirk crashes in
>                     |SEGFAULT error in libc      |Ksirk::GameLogic::AIPlayer:
>                     |                            |:~AIPlayer
>            Component|general                     |general
>              Version|unspecified                 |21.12.3
>
> --- Comment #1 from Nate Graham <nate@kde.org> ---
> 22.04 ships the quite-outdated version 21.12 version of KSirk which is almost
> two years old, and as such, out of support from KDE. Any chance you can upgrade
> to 23.04 or 23.08 and try again? Thanks!
>
Comment 3 Nate Graham 2023-09-12 16:10:14 UTC
For software installed from your distro's software repositories, the version provided to you is the one they feel comfortable shipping. If you feel that this version is too old, there are a few options:

1. Get a newer version of the software from Flatpak or Snap. This is the best solution for apps, but it not applicable for Plasma itself.
2. Use a PPA/COPR/OBS repo etc to overlay a newer version packaged from somebody else on top of your distro-provided version. This is not recommended as it tends to cause problems updating the system later.
3. Compile a newer version of the software yourself; see https://community.kde.org/Get_Involved/development. This is an advanced option that's not recommended for people who aren't software developers or technical experts.
3. Switch to a different distro and offers software updates on a faster schedule. This is often painful but generally the correct solution if you discover that the distro you chose doesn't have a software update schedule that matches your preferences.
Comment 4 Bug Janitor Service 2023-09-27 03:46:12 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 5 Bug Janitor Service 2023-10-12 03:46:10 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!