Bug 264088 - It should not be possible to pause the game before starting it
Summary: It should not be possible to pause the game before starting it
Status: RESOLVED FIXED
Alias: None
Product: kblocks
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Zhongjie Cai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 16:09 UTC by oldmanbim
Modified: 2015-12-19 19:08 UTC (History)
4 users (show)

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 oldmanbim 2011-01-23 16:09:13 UTC
Application: kblocks (0.3)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-24-server x86_64
Distribution: Ubuntu 10.10

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

I started the app, switched KVM to another machine.  After a few minutes, switched back, clicked in app and it crashed.

-- Backtrace:
Application: KBlocks (kblocks), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fcd5890c760 (LWP 1138))]

Thread 9 (Thread 0x7fcd4b6ab700 (LWP 1139)):
#0  0x00007fcd557bd203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fcd51f22009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007fcd51f227b5 in g_main_loop_run () from /lib/libglib-2.0.so.0
#3  0x00007fcd4bde20f4 in ?? () from /usr/lib/libgio-2.0.so.0
#4  0x00007fcd51f477e4 in ?? () from /lib/libglib-2.0.so.0
#5  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fcd33177700 (LWP 1140)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:212
#1  0x00007fcd38ebc0d1 in ?? () from /usr/lib/libxine.so.1
#2  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#3  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fcd32976700 (LWP 1141)):
#0  0x00007fcd55d7566f in __pthread_mutex_lock (mutex=0x203dbf8) at pthread_mutex_lock.c:62
#1  0x00007fcd51f218bf in g_main_context_prepare () from /lib/libglib-2.0.so.0
#2  0x00007fcd51f21e78 in ?? () from /lib/libglib-2.0.so.0
#3  0x00007fcd51f2245c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#4  0x00007fcd5611e1e6 in QEventDispatcherGlib::processEvents (this=0x2448e20, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007fcd560f0a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007fcd560f0dec in QEventLoop::exec (this=0x7fcd32975d90, flags=) at kernel/qeventloop.cpp:201
#7  0x00007fcd55ffb2fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007fcd391182b0 in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#9  0x00007fcd55ffe27e in QThreadPrivate::start (arg=0x203c8f0) at thread/qthread_unix.cpp:266
#10 0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fcd31f70700 (LWP 1142)):
#0  0x00007fcd557bd203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fcd52a5740f in ?? () from /usr/lib/libpulse.so.0
#2  0x00007fcd52a46d76 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3  0x00007fcd52a487f9 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4  0x00007fcd52a488b0 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#5  0x00007fcd52a5720b in ?? () from /usr/lib/libpulse.so.0
#6  0x00007fcd4ebdffb8 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#7  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#8  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fcd2d76e700 (LWP 1143)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fcd38ecce83 in ?? () from /usr/lib/libxine.so.1
#2  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#3  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fcd2cf6d700 (LWP 1144)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:212
#1  0x00007fcd38ebc0d1 in ?? () from /usr/lib/libxine.so.1
#2  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#3  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fcd2c76c700 (LWP 1145)):
#0  __pthread_mutex_lock_full (mutex=0x7fcd441b43f0) at pthread_mutex_lock.c:291
#1  0x00007fcd4ebdf25e in pa_mutex_lock () from /usr/lib/libpulsecommon-0.9.21.so
#2  0x00007fcd52a57419 in ?? () from /usr/lib/libpulse.so.0
#3  0x00007fcd52a46d76 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#4  0x00007fcd52a487f9 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#5  0x00007fcd52a488b0 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#6  0x00007fcd52a5720b in ?? () from /usr/lib/libpulse.so.0
#7  0x00007fcd4ebdffb8 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#8  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fcd27f6a700 (LWP 1146)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fcd38ecce83 in ?? () from /usr/lib/libxine.so.1
#2  0x00007fcd55d73971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#3  0x00007fcd557c992d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fcd5890c760 (LWP 1138)):
[KCrash Handler]
#6  KGamePopupItem::setMessageTimeout (this=0xff3bc244, msec=2000) at ../../libkdegames/kgamepopupitem.cpp:379
#7  0x0000000000423a2f in KBlocksScene::showMessage (this=0x20283f0, message=..., ms=2000) at ../../kblocks/KBlocksScene.cpp:297
#8  0x00000000004248ca in KBlocksScene::pauseGame (this=0x20283f0, flag=<value optimized out>, fromUI=<value optimized out>) at ../../kblocks/KBlocksScene.cpp:226
#9  0x000000000042016b in KBlocksWin::pauseGame (this=0x2020640) at ../../kblocks/KBlocksWin.cpp:149
#10 0x00000000004105ac in KBlocksWin::qt_metacall (this=0x2020640, _c=QMetaObject::InvokeMetaMethod, _id=2000, _a=0x7fffef08fc20) at moc_KBlocksWin.cpp:92
#11 0x00007fcd56109b27 in QMetaObject::activate (sender=0x2454640, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x2) at kernel/qobject.cpp:3280
#12 0x00007fcd56aa0852 in QAction::triggered (this=0xff3bc244, _t1=true) at .moc/release-shared/moc_qaction.cpp:263
#13 0x00007fcd56aa1f5b in QAction::activate (this=0x2454640, event=<value optimized out>) at kernel/qaction.cpp:1256
#14 0x00007fcd56e8157a in QAbstractButtonPrivate::click (this=0x2478680) at widgets/qabstractbutton.cpp:528
#15 0x00007fcd56e8182c in QAbstractButton::mouseReleaseEvent (this=0x24f09f0, e=0x7fffef090580) at widgets/qabstractbutton.cpp:1121
#16 0x00007fcd56f5152a in QToolButton::mouseReleaseEvent (this=0xff3bc244, e=0x7d0) at widgets/qtoolbutton.cpp:721
#17 0x00007fcd56afe04e in QWidget::event (this=0x24f09f0, event=0x7fffef090580) at kernel/qwidget.cpp:8187
#18 0x00007fcd56aa7fdc in QApplicationPrivate::notify_helper (this=0x1d92500, receiver=0x24f09f0, e=0x7fffef090580) at kernel/qapplication.cpp:4396
#19 0x00007fcd56aae30e in QApplication::notify (this=0x7fffef091280, receiver=0x24f09f0, e=0x7fffef090580) at kernel/qapplication.cpp:3959
#20 0x00007fcd57ff0156 in KApplication::notify (this=0x7fffef091280, receiver=0x24f09f0, event=0x7fffef090580) at ../../kdeui/kernel/kapplication.cpp:310
#21 0x00007fcd560f1cdc in QCoreApplication::notifyInternal (this=0x7fffef091280, receiver=0x24f09f0, event=0x7fffef090580) at kernel/qcoreapplication.cpp:732
#22 0x00007fcd56aacdbe in sendEvent (receiver=0x24f09f0, event=0x7fffef090580, alienWidget=0x24f09f0, nativeWidget=0x2020640, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#23 QApplicationPrivate::sendMouseEvent (receiver=0x24f09f0, event=0x7fffef090580, alienWidget=0x24f09f0, nativeWidget=0x2020640, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:3058
#24 0x00007fcd56b30345 in QETWidget::translateMouseEvent (this=0x2020640, event=<value optimized out>) at kernel/qapplication_x11.cpp:4403
#25 0x00007fcd56b2ec5c in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffef090ea0) at kernel/qapplication_x11.cpp:3536
#26 0x00007fcd56b5b0e2 in x11EventSourceDispatch (s=0x1d96b20, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#27 0x00007fcd51f1e342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#28 0x00007fcd51f222a8 in ?? () from /lib/libglib-2.0.so.0
#29 0x00007fcd51f2245c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#30 0x00007fcd5611e193 in QEventDispatcherGlib::processEvents (this=0x1d89c00, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#31 0x00007fcd56b5aa4e in QGuiEventDispatcherGlib::processEvents (this=0xff3bc244, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#32 0x00007fcd560f0a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#33 0x00007fcd560f0dec in QEventLoop::exec (this=0x7fffef0911d0, flags=) at kernel/qeventloop.cpp:201
#34 0x00007fcd560f4ebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#35 0x0000000000414210 in main (argc=<value optimized out>, argv=<value optimized out>) at ../../kblocks/main.cpp:368

Reported using DrKonqi
Comment 1 oldmanbim 2011-01-23 17:34:53 UTC
I pushed the "pause" button before the game was started.  Won't do it again, promise!
Comment 2 Frederik Schwarzer 2011-06-29 15:55:55 UTC
It should not be possible to pause a game before it was started. If it is, it is a bug.

So, can you reproduce the problem without KVM?
Comment 3 oldmanbim 2011-06-30 00:02:05 UTC
I can still pause a game without starting one, but I can no longer reproduce the crash - but I've gone the the next version of Ubuntu.
Comment 4 Frederik Schwarzer 2011-06-30 00:49:50 UTC
Ok, thanks, I will change the severity of the bug then.
Comment 5 Julian Helfferich 2015-12-19 19:08:52 UTC
Git commit 6879ab00fbbda433174bb3fa8b8de8bcc7c950a8 by Julian Helfferich.
Committed on 17/12/2015 at 02:26.
Pushed by helfferich into branch 'master'.

Deactivate pause button when no game is running

Before, the pause button was always activated even when no game was
running. This lead to undesired behavior, e.g. making it necessary to
press the pause button twice to pause the game.

With this fix, the pause button is deactivated on startup. The button
gets activated when a game is started and when the button is pressed, it
checks whether there is a running game.
REVIEW: 126200

M  +17   -0    KBlocksWin.cpp

http://commits.kde.org/kblocks/6879ab00fbbda433174bb3fa8b8de8bcc7c950a8