Bug 160913 - Crash selecting player (human, computer) after game
Summary: Crash selecting player (human, computer) after game
Status: RESOLVED FIXED
Alias: None
Product: konquest
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Pierre Ducroquet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-16 22:22 UTC by GnuShi
Modified: 2008-04-17 23:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GnuShi 2008-04-16 22:22:40 UTC
Version:           2.0 (using Devel)
Installed from:    Compiled sources
Compiler:          cmake SVN version
OS:                Linux

This is related to the todays SVN version.

Starting konquest, having 2 player, Blue and Yellow. 
Selecting Blue the hard computer player. Playing a while. 
Afterwards, klicking to "new game" (toolbar) and selecting the yellow player the computer player. The blue one remains human. Clicking to OK crashes the game.

Here the backtrace:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Application: Konquest (konquest), signal SIGSEGV
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb6148720 (LWP 15669)]
[KCrash handler]
#6  0xb7dd0b6c in QObject::killTimer (this=0x84a1c70, id=1)
    at /home/devel/kde/src/qt-copy/src/corelib/kernel/qobject.cpp:1530
#7  0xb7ddcf4e in QTimer::stop (this=0x84a1c70)
    at /home/devel/kde/src/qt-copy/src/corelib/kernel/qtimer.cpp:249
#8  0x080636be in PlanetItem::unselect (this=0x84905a8)
    at /home/devel/kde/src/KDE/kdegames/konquest/mapitems.cc:161
#9  0x0806214c in MapScene::unselectPlanet (this=0x80f7ed8)
    at /home/devel/kde/src/KDE/kdegames/konquest/mapscene.cc:84
#10 0x0805f57a in GameView::turn (this=0x80eca20)
    at /home/devel/kde/src/KDE/kdegames/konquest/gameview.cc:255
#11 0x080601c1 in GameView::startNewGame (this=0x80eca20)
    at /home/devel/kde/src/KDE/kdegames/konquest/gameview.cc:538
#12 0x080605a6 in GameView::qt_metacall (this=0x80eca20, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbff2071c)
    at /home/devel/kde/build/KDE/kdegames/konquest/gameview.moc:93
#13 0xb7dd65f9 in QMetaObject::activate (sender=0x8234cb0, 
    from_signal_index=5, to_signal_index=6, argv=0xbff2071c)
    at /home/devel/kde/src/qt-copy/src/corelib/kernel/qobject.cpp:3004
#14 0xb7dd6a30 in QMetaObject::activate (sender=0x8234cb0, m=0xb791f6d8, 
    from_local_signal_index=1, to_local_signal_index=2, argv=0xbff2071c)
    at /home/devel/kde/src/qt-copy/src/corelib/kernel/qobject.cpp:3094
#15 0xb71a1511 in QAction::triggered (this=0x8234cb0, _t1=false)
    at .moc/release-shared/moc_qaction.cpp:216
#16 0xb71a22af in QAction::activate (this=0x8234cb0, event=QAction::Trigger)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qaction.cpp:1129
#17 0xb75af182 in QToolButton::nextCheckState (this=0x0)
    at ../../include/QtGui/../../../../src/qt-copy/src/gui/kernel/qaction.h:201
#18 0xb74d6a1f in QAbstractButtonPrivate::click (this=0x8326630)
    at /home/devel/kde/src/qt-copy/src/gui/widgets/qabstractbutton.cpp:529
#19 0xb74d6cbb in QAbstractButton::mouseReleaseEvent (this=0x8111e08, 
    e=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/widgets/qabstractbutton.cpp:1116
#20 0xb75af27c in QToolButton::mouseReleaseEvent (this=0x8111e08, e=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/widgets/qtoolbutton.cpp:675
#21 0xb71fcaf4 in QWidget::event (this=0x8111e08, event=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qwidget.cpp:6850
#22 0xb74d5d5f in QAbstractButton::event (this=0x8111e08, e=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/widgets/qabstractbutton.cpp:1078
#23 0xb75aed84 in QToolButton::event (this=0x8111e08, e=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/widgets/qtoolbutton.cpp:1105
#24 0xb71a839c in QApplicationPrivate::notify_helper (this=0x807be80, 
    receiver=0x8111e08, e=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qapplication.cpp:3735
#25 0xb71ad445 in QApplication::notify (this=0xbff214a8, receiver=0x8111e08, 
    e=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qapplication.cpp:3464
#26 0xb6e9f54b in KApplication::notify (this=0xbff214a8, receiver=0x8111e08, 
    event=0xbff20dd0)
    at /home/devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#27 0xb7dc1b79 in QCoreApplication::notifyInternal (this=0xbff214a8, 
    receiver=0x8111e08, event=0xbff20dd0)
    at /home/devel/kde/src/qt-copy/src/corelib/kernel/qcoreapplication.cpp:586
#28 0xb71aa591 in QApplicationPrivate::sendMouseEvent (receiver=0x8111e08, 
    event=0xbff20dd0, alienWidget=0x8111e08, nativeWidget=0x80df250, 
    buttonDown=0xb793ba50, lastMouseReceiver=@0xb793ba54)
    at ../../include/QtCore/../../../../src/qt-copy/src/corelib/kernel/qcoreapplication.h:218
#29 0xb72133ee in QETWidget::translateMouseEvent (this=0x80df250, 
    event=0xbff211fc)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qapplication_x11.cpp:4096
#30 0xb72122fe in QApplication::x11ProcessEvent (this=0xbff214a8, 
    event=0xbff211fc)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qapplication_x11.cpp:3218
#31 0xb7238af4 in x11EventSourceDispatch (s=0x807f4c8, callback=0, 
    user_data=0x0)
    at /home/devel/kde/src/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:148
#32 0xb633d7e8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#33 0xb6340a3e in ?? () from /usr/lib/libglib-2.0.so.0
#34 0x0807e8a0 in ?? ()
#35 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Comment 1 Pierre Ducroquet 2008-04-16 22:35:28 UTC
I tried several times, but it didn't crash :/ Perhaps because I'm not having the same hardware configuration (I see threads and timers in the backtrace... Using a 64 bits dual core system may affect this I suppose)
So I'm gonna try to guess and fix the crash using your backtrace only...
Comment 2 Pierre Ducroquet 2008-04-16 22:42:33 UTC
Hum, can you please try this small patch.
It can't hurt, I hope it'll fix the crash, but I'm not sure at all... I fear something more complex, that's gonna be hard to guess.

Index: mapscene.cc
===================================================================
--- mapscene.cc (revision 796339)
+++ mapscene.cc (working copy)
@@ -82,6 +82,7 @@
 {
     if (m_selectedPlanetItem) {
         m_selectedPlanetItem->unselect();
+        m_selectedPlanetItem = NULL;
     }
 }
Comment 3 GnuShi 2008-04-17 01:15:47 UTC
Excellent!

Works.
Comment 4 Pierre Ducroquet 2008-04-17 01:22:40 UTC
It works ????
I can hardly believe it...
Anyway, I'm gonna commit this fix as soon as debian bug #476117 is fixed (I can't use KDE SVN repositories right now, it's a quite serious problem)
Comment 5 GnuShi 2008-04-17 11:39:11 UTC
Tried again, and it works really well. The fix loks totally unrelated to me, but konquest does not crash anymore. :-)

Comment 6 Pierre Ducroquet 2008-04-17 23:31:08 UTC
SVN commit 798276 by ducroquet:

Fixes crash #160913.
I still can't believe clearly how this fixes it, and why it didn't crash on my computer.
Anyway, it works... suprising....


BUG: 160913



 M  +1 -0      mapscene.cc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=798276