Bug 319808

Summary: Konquest hangs when setting bad game configuration.
Product: [Applications] konquest Reporter: Martin Walch <walch.martin>
Component: generalAssignee: Pierre Ducroquet <pinaraf>
Status: RESOLVED FIXED    
Severity: crash CC: kde-games-bugs
Priority: NOR    
Version: 2.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.12
Sentry Crash Report:

Description Martin Walch 2013-05-14 01:48:49 UTC
Application: konquest (2.1)
KDE Platform Version: 4.10.3 (Compiled from sources)
Qt Version: 4.8.4
Operating System: Linux 3.8.12-gentoo-gnu x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
- What I was doing when the application crashed:
I made konquest crash by manually sending SIGSEGV

- Custom settings of the application:
1. start konquest
2. New
3. manually make all planets neutral or vacant
4. OK

Now konquest is in an infinite loop eating one cpu.

The crash can be reproduced every time.

-- Backtrace:
Application: Konquest (konquest), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#6  *__GI___libc_free (mem=<optimized out>) at malloc.c:2983
#7  0x00007f38e17b502e in QStateMachinePrivate::_q_start (this=0x2494aa0) at statemachine/qstatemachine.cpp:1233
#8  0x00007f38e177c746 in QObject::event (this=0x2051fa8, e=0x7f38e101a620 <main_arena>) at kernel/qobject.cpp:1194
#9  0x00007f38e17b272a in QStateMachine::event (this=0x2051fa8, e=0x203b830) at statemachine/qstatemachine.cpp:2075
#10 0x00007f38e241d04c in QApplicationPrivate::notify_helper (this=0x1b931f0, receiver=0x2051fa8, e=0x203b830) at kernel/qapplication.cpp:4562
#11 0x00007f38e2423c14 in QApplication::notify (this=0x7fff3b187e90, receiver=<optimized out>, e=0x203b830) at kernel/qapplication.cpp:3944
#12 0x00007f38e3462056 in KApplication::notify (this=0x7fff3b187e90, receiver=0x2051fa8, event=0x203b830) at /var/tmp/portage/kde-base/kdelibs-4.10.3-r1/work/kdelibs-4.10.3/kdeui/kernel/kapplication.cpp:311
#13 0x00007f38e17699ac in QCoreApplication::notifyInternal (this=0x7fff3b187e90, receiver=0x2051fa8, event=0x203b830) at kernel/qcoreapplication.cpp:946
#14 0x00007f38e176e454 in sendEvent (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#15 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<optimized out>, data=0x1b73000) at kernel/qcoreapplication.cpp:1570
#16 0x00007f38e179baab in sendPostedEvents () at kernel/qcoreapplication.h:236
#17 postEventSourceDispatch (s=0x1b90c30) at kernel/qeventdispatcher_glib.cpp:279
#18 0x00007f38ddea3df5 in g_main_dispatch (context=<optimized out>) at gmain.c:2539
#19 g_main_context_dispatch (context=<optimized out>) at gmain.c:3075
#20 0x00007f38ddea64fd in g_main_context_iterate (context=0x1b8fa00, block=<optimized out>, dispatch=<optimized out>, self=<optimized out>) at gmain.c:3146
#21 0x00007f38ddea656b in g_main_context_iteration (context=0x1b8fa00, may_block=0) at gmain.c:3207
#22 0x00007f38e179b5e5 in QEventDispatcherGlib::processEvents (this=0x1b915c0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#23 0x00007f38e24d13e2 in QGuiEventDispatcherGlib::processEvents (this=0x7f38e101a620 <main_arena>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#24 0x00007f38e176e9c1 in QCoreApplication::processEvents (flags=<error reading variable: DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjunction with DW_OP_piece or DW_OP_bit_piece.>) at kernel/qcoreapplication.cpp:1133
#25 0x0000000000415dba in LocalGame::start (this=0x2051f70) at /var/tmp/portage/kde-base/konquest-4.10.3/work/konquest-4.10.3/localgame.cpp:34
#26 0x000000000041c474 in GameView::startNewGame (this=0x2038420) at /var/tmp/portage/kde-base/konquest-4.10.3/work/konquest-4.10.3/gameview.cc:476
#27 0x00007f38e17807b5 in QMetaObject::activate (sender=<optimized out>, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7f38e101a630 <main_arena+16>) at kernel/qobject.cpp:3539
#28 0x00007f38e24168c1 in QAction::triggered (this=0x7f38e101a620 <main_arena>, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#29 0x00007f38e241809c in QAction::activate (this=0x1c2d030, event=<optimized out>) at kernel/qaction.cpp:1257
#30 0x00007f38e27faf8f in QAbstractButtonPrivate::click (this=0x1fa9350) at widgets/qabstractbutton.cpp:530
#31 0x00007f38e27fb24d in QAbstractButton::mouseReleaseEvent (this=0x204afe0, e=0x7fff3b187340) at widgets/qabstractbutton.cpp:1123
#32 0x00007f38e28ccfa2 in QToolButton::mouseReleaseEvent (this=0x7f38e101a620 <main_arena>, e=0x20d2850) at widgets/qtoolbutton.cpp:718
#33 0x00007f38e2477532 in QWidget::event (this=0x204afe0, event=0x7fff3b187340) at kernel/qwidget.cpp:8375
#34 0x00007f38e241d04c in QApplicationPrivate::notify_helper (this=0x1b931f0, receiver=0x204afe0, e=0x7fff3b187340) at kernel/qapplication.cpp:4562
#35 0x00007f38e24243f8 in QApplication::notify (this=0x7fff3b187e90, receiver=<optimized out>, e=0x7fff3b187340) at kernel/qapplication.cpp:4105
#36 0x00007f38e3462056 in KApplication::notify (this=0x7fff3b187e90, receiver=0x204afe0, event=0x7fff3b187340) at /var/tmp/portage/kde-base/kdelibs-4.10.3-r1/work/kdelibs-4.10.3/kdeui/kernel/kapplication.cpp:311
#37 0x00007f38e17699ac in QCoreApplication::notifyInternal (this=0x7fff3b187e90, receiver=0x204afe0, event=0x7fff3b187340) at kernel/qcoreapplication.cpp:946
#38 0x00007f38e2423431 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#39 QApplicationPrivate::sendMouseEvent (receiver=0x204afe0, event=0x7fff3b187340, alienWidget=0x204afe0, nativeWidget=0x1c287e0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3173
#40 0x00007f38e24a8367 in QETWidget::translateMouseEvent (this=0x1c287e0, event=<optimized out>) at kernel/qapplication_x11.cpp:4516
#41 0x00007f38e24a73a0 in QApplication::x11ProcessEvent (this=<optimized out>, event=0x7fff3b187ac0) at kernel/qapplication_x11.cpp:3639
#42 0x00007f38e24d1aaa in x11EventSourceDispatch (s=0x1b92940, callback=<optimized out>, user_data=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#43 0x00007f38ddea3df5 in g_main_dispatch (context=<optimized out>) at gmain.c:2539
#44 g_main_context_dispatch (context=<optimized out>) at gmain.c:3075
#45 0x00007f38ddea64fd in g_main_context_iterate (context=0x1b8fa00, block=<optimized out>, dispatch=<optimized out>, self=<optimized out>) at gmain.c:3146
#46 0x00007f38ddea656b in g_main_context_iteration (context=0x1b8fa00, may_block=1) at gmain.c:3207
#47 0x00007f38e179b637 in QEventDispatcherGlib::processEvents (this=0x1b915c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#48 0x00007f38e24d13e2 in QGuiEventDispatcherGlib::processEvents (this=0x7f38e101a620 <main_arena>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x00007f38e17684e8 in QEventLoop::processEvents (this=<optimized out>, flags=<error reading variable: DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjunction with DW_OP_piece or DW_OP_bit_piece.>) at kernel/qeventloop.cpp:149
#50 0x00007f38e1768975 in QEventLoop::exec (this=0x7fff3b187dd0, flags=<error reading variable: DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjunction with DW_OP_piece or DW_OP_bit_piece.>) at kernel/qeventloop.cpp:204
#51 0x00007f38e176e843 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#52 0x0000000000416b8c in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/konquest-4.10.3/work/konquest-4.10.3/Konquest.cc:58

Possible duplicates by query: bug 298171.

Reported using DrKonqi
Comment 1 Nemanja Hirsl 2013-10-27 12:47:19 UTC
Git commit 90768a71eaa68de1182e78b71b572e707a712a26 by Nemanja Hirsl, on behalf of Alexander Schuch.
Committed on 27/10/2013 at 12:42.
Pushed by nhirsl into branch 'master'.

The game will never end if none of the players has any planets. This
patch makes sure that the game can only be started if all non-spectator
players do have at least one planet.

Some internal variables are renamed to make the name match their
content/purpose much better.

REVIEW:113446
FIXED-IN:4.12.1

M  +65   -50   dialogs/newgamedlg.cc

http://commits.kde.org/konquest/90768a71eaa68de1182e78b71b572e707a712a26