Bug 293404 - Konquest crash clicking near minimap
Summary: Konquest crash clicking near minimap
Status: RESOLVED FIXED
Alias: None
Product: konquest
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Pierre Ducroquet
URL:
Keywords:
: 297697 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-06 00:41 UTC by michael
Modified: 2012-07-09 18:56 UTC (History)
3 users (show)

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


Attachments
minimap patch (495 bytes, patch)
2012-02-06 01:12 UTC, michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michael 2012-02-06 00:41:06 UTC
Application: konquest (2.1)
KDE Platform Version: 4.8.00 (4.8.0
Qt Version: 4.7.4
Operating System: Linux 3.0.0-15-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:
I was attetempting to clicking on the minimap but instead clickded slightly off of it. This results in m_map->sector(m_selection) returning null because m_selection is out of range. MiniMapView::mousePressEvent then calls hasPlanet on the null pointer and crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Konquest (konquest), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f7fb94f8780 (LWP 2907))]

Thread 2 (Thread 0x7f7fa80c6700 (LWP 2908)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007f7fa80c5af0 in ?? ()
#2  0x00007fffcdbff7e7 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x7f7fb94f8780 (LWP 2907)):
[KCrash Handler]
#6  hasPlanet (this=<optimized out>) at /usr/src/kdesrc/kdegames-4.8.0/konquest/sector.h:56
#7  MiniMapView::mousePressEvent (this=<optimized out>, event=<optimized out>) at /usr/src/kdesrc/kdegames-4.8.0/konquest/minimapview.cc:75
#8  0x00007f7fb798bfc9 in QWidget::event (this=0x17b2320, event=0x7fffcdb11900) at kernel/qwidget.cpp:8291
#9  0x00007f7fb793b474 in notify_helper (e=0x7fffcdb11900, receiver=0x17b2320, this=0xe43520) at kernel/qapplication.cpp:4486
#10 QApplicationPrivate::notify_helper (this=0xe43520, receiver=0x17b2320, e=0x7fffcdb11900) at kernel/qapplication.cpp:4458
#11 0x00007f7fb7940cbb in QApplication::notify (this=<optimized out>, receiver=0x17b2320, e=0x7fffcdb11900) at kernel/qapplication.cpp:4047
#12 0x00007f7fb8ef4ae6 in KApplication::notify (this=0x7fffcdb13d18, receiver=0x17b2320, event=0x7fffcdb11900) at ../../kdeui/kernel/kapplication.cpp:311
#13 0x00007f7fb6a68afc in QCoreApplication::notifyInternal (this=0x7fffcdb13d18, receiver=0x17b2320, event=0x7fffcdb11900) at kernel/qcoreapplication.cpp:787
#14 0x00007f7fb793c442 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#15 QApplicationPrivate::sendMouseEvent (receiver=0x17b2320, event=0x7fffcdb11900, alienWidget=0x17b2320, nativeWidget=0x1ab6f20, buttonDown=0x17b2320, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3146
#16 0x00007f7fb79bb9d5 in QETWidget::translateMouseEvent (this=0x1ab6f20, event=<optimized out>) at kernel/qapplication_x11.cpp:4571
#17 0x00007f7fb79ba94e in QApplication::x11ProcessEvent (this=0x7fffcdb13d18, event=0x7fffcdb12120) at kernel/qapplication_x11.cpp:3693
#18 0x00007f7fb79e34a2 in x11EventSourceDispatch (s=0xe48900, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#19 0x00007f7fb3af1a5d in g_main_dispatch (context=0xe48400) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#20 g_main_context_dispatch (context=0xe48400) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#21 0x00007f7fb3af2258 in g_main_context_iterate (context=0xe48400, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#22 0x00007f7fb3af2429 in g_main_context_iteration (context=0xe48400, may_block=1) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3152
#23 0x00007f7fb6a93ed6 in QEventDispatcherGlib::processEvents (this=0xe22a10, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#24 0x00007f7fb79e310e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#25 0x00007f7fb6a67cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#26 0x00007f7fb6a67ef7 in QEventLoop::exec (this=0x7fffcdb124f0, flags=...) at kernel/qeventloop.cpp:201
#27 0x00007f7fb7df22d6 in QDialog::exec (this=0x1ab6f20) at dialogs/qdialog.cpp:552
#28 0x0000000000424193 in GameView::startNewGame (this=) at /usr/src/kdesrc/kdegames-4.8.0/konquest/gameview.cc:455
#29 0x000000000041ceb1 in MainWindow::qt_metacall (this=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/kdesrc/kdegames-4.8.0/build/konquest/moc_mainwin.cpp:75
#30 0x00007f7fb6a7beba in QMetaObject::activate (sender=0x1023400, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffcdb126a0) at kernel/qobject.cpp:3278
#31 0x00007f7fb7934bb2 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#32 0x00007f7fb7934d9f in QAction::activate (this=0x1023400, event=<optimized out>) at kernel/qaction.cpp:1257
#33 0x00007f7fb7d6f6c9 in QMenuPrivate::activateCausedStack (this=0x13fb6a0, causedStack=..., action=0x1023400, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1005
#34 0x00007f7fb7d75312 in QMenuPrivate::activateAction (this=0x13fb6a0, action=0x1023400, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1097
#35 0x00007f7fb8fb6210 in KMenu::mouseReleaseEvent (this=0x1400660, e=0x7fffcdb130b0) at ../../kdeui/widgets/kmenu.cpp:464
#36 0x00007f7fb798bcea in QWidget::event (this=0x1400660, event=0x7fffcdb130b0) at kernel/qwidget.cpp:8295
#37 0x00007f7fb7d768bb in QMenu::event (this=0x1400660, e=0x7fffcdb130b0) at widgets/qmenu.cpp:2405
#38 0x00007f7fb793b474 in notify_helper (e=0x7fffcdb130b0, receiver=0x1400660, this=0xe43520) at kernel/qapplication.cpp:4486
#39 QApplicationPrivate::notify_helper (this=0xe43520, receiver=0x1400660, e=0x7fffcdb130b0) at kernel/qapplication.cpp:4458
#40 0x00007f7fb7940cbb in QApplication::notify (this=<optimized out>, receiver=0x1400660, e=0x7fffcdb130b0) at kernel/qapplication.cpp:4047
#41 0x00007f7fb8ef4ae6 in KApplication::notify (this=0x7fffcdb13d18, receiver=0x1400660, event=0x7fffcdb130b0) at ../../kdeui/kernel/kapplication.cpp:311
#42 0x00007f7fb6a68afc in QCoreApplication::notifyInternal (this=0x7fffcdb13d18, receiver=0x1400660, event=0x7fffcdb130b0) at kernel/qcoreapplication.cpp:787
#43 0x00007f7fb793c442 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#44 QApplicationPrivate::sendMouseEvent (receiver=0x1400660, event=0x7fffcdb130b0, alienWidget=0x0, nativeWidget=0x1400660, buttonDown=0x0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3146
#45 0x00007f7fb79bc091 in QETWidget::translateMouseEvent (this=0x1400660, event=<optimized out>) at kernel/qapplication_x11.cpp:4505
#46 0x00007f7fb79ba94e in QApplication::x11ProcessEvent (this=0x7fffcdb13d18, event=0x7fffcdb138d0) at kernel/qapplication_x11.cpp:3693
#47 0x00007f7fb79e34a2 in x11EventSourceDispatch (s=0xe48900, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#48 0x00007f7fb3af1a5d in g_main_dispatch (context=0xe48400) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#49 g_main_context_dispatch (context=0xe48400) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#50 0x00007f7fb3af2258 in g_main_context_iterate (context=0xe48400, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#51 0x00007f7fb3af2429 in g_main_context_iteration (context=0xe48400, may_block=1) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3152
#52 0x00007f7fb6a93ed6 in QEventDispatcherGlib::processEvents (this=0xe22a10, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#53 0x00007f7fb79e310e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#54 0x00007f7fb6a67cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#55 0x00007f7fb6a67ef7 in QEventLoop::exec (this=0x7fffcdb13ca0, flags=...) at kernel/qeventloop.cpp:201
#56 0x00007f7fb6a6c789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#57 0x000000000041f8ea in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/kdesrc/kdegames-4.8.0/konquest/Konquest.cc:58

Reported using DrKonqi
Comment 1 michael 2012-02-06 01:12:56 UTC
Created attachment 68541 [details]
minimap patch

This patch adds a NULL pointer check to MiniMapView::mousePressEvent. I was made with kdegames-4.8.0 source.
Comment 2 Jekyll Wu 2012-07-05 21:36:49 UTC
*** Bug 297697 has been marked as a duplicate of this bug. ***
Comment 3 Albert Astals Cid 2012-07-09 18:55:06 UTC
Fixed in 4.8.5 thanks for the patch