Bug 245465

Summary: Crash when starting
Product: [Applications] ktuberling Reporter: Christoph Feck <cfeck>
Component: generalAssignee: Alex Fiestas <afiestas>
Status: RESOLVED FIXED    
Severity: crash CC: aacid, kde-games-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.7.0

Description Christoph Feck 2010-07-22 19:03:19 UTC
Application: ktuberling (0.6.0)
KDE Platform Version: 4.5.60 (KDE 4.5.60 (KDE 4.6 >= 20100627)) (Compiled from sources)
Qt Version: 4.7.0
Operating System: Linux 2.6.34-12-desktop i686
Distribution: "openSUSE 11.3 (i586)"

-- Information about the crash:
Just starting KTuberling I get this crash. Probably related to commit r1125457.

The crash can be reproduced every time.

-- Backtrace:
Application: KTuberling (ktuberling), signal: Segmentation fault
[Current thread is 1 (Thread 0xb4d8b710 (LWP 20671))]

Thread 5 (Thread 0xb1295b70 (LWP 20708)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5edf452 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:179
#2  0xb25cb1d7 in metronom_sync_loop () from /usr/lib/libxine.so.1
#3  0xb5edab25 in start_thread (arg=0xb1295b70) at pthread_create.c:297
#4  0xb5d0446e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xb0a94b70 (LWP 20709)):
#0  0xb5edcfed in __pthread_mutex_lock (mutex=0x827befc) at pthread_mutex_lock.c:61
#1  0xb55036aa in IA__g_main_context_acquire (context=0x827bef8) at gmain.c:2047
#2  0xb5504e9d in g_main_context_iterate (context=0x827bef8, block=1, dispatch=1, self=0x8203b38) at gmain.c:2535
#3  0xb550560e in IA__g_main_context_iteration (context=0x827bef8, may_block=1) at gmain.c:2654
#4  0xb6091137 in QEventDispatcherGlib::processEvents (this=0x8161300, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:417
#5  0xb6063119 in QEventLoop::processEvents (this=0xb0a942b0, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#6  0xb6063362 in QEventLoop::exec (this=0xb0a942b0, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#7  0xb5f69f0b in QThread::exec (this=0x817aca0) at /local/git/Qt/qt/src/corelib/thread/qthread.cpp:490
#8  0xb2627315 in Phonon::Xine::XineThread::run (this=0x817aca0) at /local/git/phonon/xine/xinethread.cpp:143
#9  0xb5f6ca69 in QThreadPrivate::start (arg=0x817aca0) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:266
#10 0xb5edab25 in start_thread (arg=0xb0a94b70) at pthread_create.c:297
#11 0xb5d0446e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb0293b70 (LWP 20721)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5cf975e in __poll (fds=0xb0293294, nfds=1, timeout=333) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb2411fbc in ao_alsa_handle_event_thread () from /usr/lib/xine/plugins/1.28/xineplug_ao_out_alsa.so
#3  0xb5edab25 in start_thread (arg=0xb0293b70) at pthread_create.c:297
#4  0xb5d0446e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xafa50b70 (LWP 20722)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5edf125 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:122
#2  0xb25de0c0 in ao_loop () from /usr/lib/libxine.so.1
#3  0xb5edab25 in start_thread (arg=0xafa50b70) at pthread_create.c:297
#4  0xb5d0446e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb4d8b710 (LWP 20671)):
[KCrash Handler]
#7  d_func (this=0x0, b=true) at /local/git/Qt/qt/src/gui/kernel/qaction.h:67
#8  QAction::setChecked (this=0x0, b=true) at /local/git/Qt/qt/src/gui/kernel/qaction.cpp:1064
#9  0x08055f66 in TopLevel::changeGameboard (this=0x815d7a8, newGameBoard=...) at /local/svn/kde/trunk/KDE/kdegames/ktuberling/toplevel.cpp:146
#10 0x080556b9 in TopLevel::TopLevel (this=0x815d7a8, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /local/svn/kde/trunk/KDE/kdegames/ktuberling/toplevel.cpp:67
#11 0x08054d6f in main (argc=1, argv=0xbfc70f14) at /local/svn/kde/trunk/KDE/kdegames/ktuberling/main.cpp:53

Reported using DrKonqi
Comment 1 Alex Fiestas 2010-07-24 17:25:20 UTC
Hi
I'm unable to reproduce the bug (using Qt 4.6 and Qt 4.7), can you update your Qt 4.7 snapshot and try it again?

Thanks
Comment 2 Christoph Feck 2010-07-27 14:34:46 UTC
The problem was caused by an old ktuberlingrc file. Removing that I get no crash.

The issue is as follows: I have KDE installed to /local/kde4. This, however, is a symlink to /local/KDE4/trunk, so that I can easily switch to a previous KDE version without recompiling anything because of changed paths.

In the old ktuberlingrc file it had the entry "Gameboard=/local/kde4/share/apps/ktuberling/pics/potato-game.theme". Since the commit mentioned in comment #0 the entry must have the path with the symlink followed, i.e. "Gameboard=/local/KDE4/trunk/share/apps/ktuberling/pics/potato-game.theme" otherwise the "actionCollection()->action(fileToLoad)" returns 0, causing the crash.
Comment 3 Albert Astals Cid 2011-07-09 21:02:57 UTC
SVN commit 1240736 by aacid:

Do not crash on malformed conf files
BUGS: 245465


 M  +17 -5     toplevel.cpp  


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