Bug 245383 - Kmix multimedia keys cause crash using oss4
Summary: Kmix multimedia keys cause crash using oss4
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: Backend: OSS4 (show other bugs)
Version: 3.7
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-22 02:03 UTC by jenrichmichael
Modified: 2011-08-22 22:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (4.17 KB, text/plain)
2011-02-12 18:30 UTC, Bogdan
Details
Avoid the null pointer access that triggers this crash (3.26 KB, patch)
2011-08-04 16:25 UTC, Olivier Trichet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jenrichmichael 2010-07-22 02:03:44 UTC
Application: kmix (3.7)
KDE Platform Version: 4.4.5 (KDE 4.4.5)
Qt Version: 4.6.3
Operating System: Linux 2.6.34-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
I Hit the decrease volume multimedia key and it caused kmix to crash. I compiled kmix from the latest svn snapshot. This only happens when using ossv4 if I use alsa this problem goes away. 

The crash can be reproduced every time.

 -- Backtrace:
Application: KMix (kdeinit4), signal: Segmentation fault
[KCrash Handler]
#5  0x00007f14c327f9b5 in ?? () from /usr/lib/libkdeinit4_kmix.so
#6  0x00007f14c32734ea in ?? () from /usr/lib/libkdeinit4_kmix.so
#7  0x00007f14c325fd77 in ?? () from /usr/lib/libkdeinit4_kmix.so
#8  0x00007f14c3261e83 in ?? () from /usr/lib/libkdeinit4_kmix.so
#9  0x00007f14cf8d9def in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#10 0x00007f14cea95222 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#11 0x00007f14cea9541a in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#12 0x00007f14cfe42249 in ?? () from /usr/lib/libkdeui.so.5
#13 0x00007f14cfe44b5f in KGlobalAccel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
#14 0x00007f14cf8d9def in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#15 0x00007f14cff305a4 in ?? () from /usr/lib/libkdeui.so.5
#16 0x00007f14cff309db in ?? () from /usr/lib/libkdeui.so.5
#17 0x00007f14cdcfef9b in ?? () from /usr/lib/libQtDBus.so.4
#18 0x00007f14cdd0c22f in ?? () from /usr/lib/libQtDBus.so.4
#19 0x00007f14cf8d7689 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x00007f14cea9bae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007f14cea9fbca in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f14cfdf60e6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#23 0x00007f14cf8c5d8c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#24 0x00007f14cf8c94ea in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#25 0x00007f14cf8ee373 in ?? () from /usr/lib/libQtCore.so.4
#26 0x00007f14caf4fb33 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#27 0x00007f14caf50310 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#28 0x00007f14caf505ad in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#29 0x00007f14cf8ee87f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x00007f14ceb3b60e in ?? () from /usr/lib/libQtGui.so.4
#31 0x00007f14cf8c5172 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007f14cf8c53ac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007f14cf8c97bb in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#34 0x00007f14c325d2a2 in kdemain () from /usr/lib/libkdeinit4_kmix.so
#35 0x0000000000406b93 in _start ()

This bug may be a duplicate of or related to bug 212944.

Possible duplicates by query: bug 242472, bug 242286, bug 242272, bug 242236, bug 242085.

Reported using DrKonqi
Comment 1 Christian Esken 2010-08-04 23:43:15 UTC
Please post a complete backtrace and report it here:

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 jenrichmichael 2010-08-05 22:23:06 UTC
I will recompile the svn tonight after work in debugfull mode and post the backtrace
Comment 3 jenrichmichael 2010-08-06 03:10:23 UTC
Application: KMix (kdeinit4), signal: Segmentation fault
[KCrash Handler]
#5  0x00007f2b2800ada5 in ?? () from /usr/lib/libkdeinit4_kmix.so
#6  0x00007f2b28000532 in ?? () from /usr/lib/libkdeinit4_kmix.so
#7  0x00007f2b27feb862 in ?? () from /usr/lib/libkdeinit4_kmix.so
#8  0x00007f2b27feda43 in ?? () from /usr/lib/libkdeinit4_kmix.so
#9  0x00007f2b3466bdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#10 0x00007f2b33827222 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#11 0x00007f2b3382741a in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#12 0x00007f2b34bd4249 in ?? () from /usr/lib/libkdeui.so.5
#13 0x00007f2b34bd6b5f in KGlobalAccel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
#14 0x00007f2b3466bdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#15 0x00007f2b34cc25a4 in ?? () from /usr/lib/libkdeui.so.5
#16 0x00007f2b34cc29db in ?? () from /usr/lib/libkdeui.so.5
#17 0x00007f2b32a90f9b in ?? () from /usr/lib/libQtDBus.so.4
#18 0x00007f2b32a9e22f in ?? () from /usr/lib/libQtDBus.so.4
#19 0x00007f2b34669689 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x00007f2b3382dae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007f2b33831bca in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f2b34b880e6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#23 0x00007f2b34657d8c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#24 0x00007f2b3465b4ea in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#25 0x00007f2b34680373 in ?? () from /usr/lib/libQtCore.so.4
#26 0x00007f2b2fce1b33 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#27 0x00007f2b2fce2310 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#28 0x00007f2b2fce25ad in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#29 0x00007f2b3468087f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x00007f2b338cd60e in ?? () from /usr/lib/libQtGui.so.4
#31 0x00007f2b34657172 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007f2b346573ac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007f2b3465b7bb in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#34 0x00007f2b27feadba in kdemain () from /usr/lib/libkdeinit4_kmix.so
#35 0x0000000000406b93 in _start ()
Comment 4 Christian Esken 2010-08-20 17:45:17 UTC
But that backtrace still has no symbols for KMix:
#5  0x00007f2b2800ada5 in ?? () from /usr/lib/libkdeinit4_kmix.so
#6  0x00007f2b28000532 in ?? () from /usr/lib/libkdeinit4_kmix.so
#7  0x00007f2b27feb862 in ?? () from /usr/lib/libkdeinit4_kmix.so
#8  0x00007f2b27feda43 in ?? () from /usr/lib/libkdeinit4_kmix.so

Are you sure you did debugfull and installed it properly?
Comment 5 jenrichmichael 2010-08-26 07:21:37 UTC
Sorry about the long delay I was on vacation and so had no internet for awhile. I have discovered that though i did compile it with full debugging when you use makepkg to install it the debugging symbols are stripped. Attached please find the corrected(I hope) backtrace

Application: KMix (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fe2bfff1760 (LWP 1813))]

Thread 2 (Thread 0x7fe2a0067710 (LWP 1821)):
#0  0x00007fe2b99a3924 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#1  0x00007fe2be5e7566 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#2  0x00007fe2be5bc992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#3  0x00007fe2be5bcd6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fe2be4c6d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#5  0x00007fe2be59d178 in ?? () from /usr/lib/libQtCore.so.4
#6  0x00007fe2be4c9775 in ?? () from /usr/lib/libQtCore.so.4
#7  0x00007fe2be2399ca in start_thread () from /lib/libpthread.so.0
#8  0x00007fe2bcfeb6fd in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fe2bfff1760 (LWP 1813)):
[KCrash Handler]
#5  0x00007fe2b1df4b0e in Volume::getVolume (this=0x18, chid=Volume::CHIDMIN) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/volume.cpp:186
#6  0x00007fe2b1df4ac6 in Volume::operator[] (this=0x18, id=0) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/volume.cpp:174
#7  0x00007fe2b1deb1c4 in Mixer_OSS4::writeVolumeToHW (this=0x2223c20, id=..., md=0x0) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/mixer_oss4.cpp:637
#8  0x00007fe2b1dede17 in Mixer::decreaseVolume (this=0x21e3cb0, mixdeviceID=...) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/mixer.cpp:632
#9  0x00007fe2b1dca5f9 in KMixWindow::increaseOrDecreaseVolume (this=0x1f09a40, increase=false) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/kmix.cpp:700
#10 0x00007fe2b1dca64f in KMixWindow::slotDecreaseVolume (this=0x1f09a40) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/kmix.cpp:712
#11 0x00007fe2b1dcb23f in KMixWindow::qt_metacall (this=0x1f09a40, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0x7fff24dca0d0) at /home/mjenrich/Source/kdemultimedia-4.5.0/build/kmix/kmix.moc:126
#12 0x00007fe2be5d0e3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#13 0x00007fe2bd754032 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#14 0x00007fe2bd7560ab in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#15 0x00007fe2beb58284 in ?? () from /usr/lib/libkdeui.so.5
#16 0x00007fe2beb5d4e4 in KGlobalAccel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
#17 0x00007fe2be5d0e3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#18 0x00007fe2bec5d0e4 in ?? () from /usr/lib/libkdeui.so.5
#19 0x00007fe2bec5d413 in ?? () from /usr/lib/libkdeui.so.5
#20 0x00007fe2bc982486 in ?? () from /usr/lib/libQtDBus.so.4
#21 0x00007fe2bc98d05f in ?? () from /usr/lib/libQtDBus.so.4
#22 0x00007fe2be5cdd49 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#23 0x00007fe2bd75a22c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00007fe2bd7606fb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0x00007fe2beb05526 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#26 0x00007fe2be5be06c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#27 0x00007fe2be5c07e7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#28 0x00007fe2be5e79d3 in ?? () from /usr/lib/libQtCore.so.4
#29 0x00007fe2b999f8c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#30 0x00007fe2b99a3748 in ?? () from /lib/libglib-2.0.so.0
#31 0x00007fe2b99a38fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#32 0x00007fe2be5e7513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007fe2bd80a46e in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007fe2be5bc992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x00007fe2be5bcd6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007fe2be5c0aab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#37 0x00007fe2b1dc6998 in kdemain (argc=3, argv=0x1ef95d0) at /home/mjenrich/Source/kdemultimedia-4.5.0/kmix/main.cpp:72
#38 0x00000000004070f3 in _start ()
Comment 6 Bogdan 2011-02-12 18:30:23 UTC
Created attachment 57192 [details]
New crash information added by DrKonqi

kmix (3.9-alpha) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed:
I'm using my hot keys to increase\decrease volume. After that kmix crashes
- Custom settings of the application:

-- Backtrace (Reduced):
#10 0x00007ffdffa36c42 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#11 0x00007ffdffa36e3a in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
[...]
#13 0x00007ffe0165b093 in KGlobalAccel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
[...]
#19 0x00007ffe008a417a in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x00007ffdffa3d2b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
Comment 7 Olivier Trichet 2011-08-04 16:25:46 UTC
Created attachment 62544 [details]
Avoid the null pointer access that triggers this crash

This patch uses the same null gard in increaseVolume and decreaseVolume.
This also explains why only the decreasing of the volume does induce a crash.
Comment 8 Christian Esken 2011-08-22 21:48:42 UTC
Thanks for the patch. I manually adapted it to trunk, including the increaseOrDecreaseVolume() method. I'll close it once I apply it to branch 4.7. But I will only do the one important 0 pointer guard fix.
Comment 9 Christian Esken 2011-08-22 21:50:25 UTC
SVN commit 1248940 by esken:

BUGS: 245383
Fix NPE in decreaseVolume(). Backport to branch 4.7.


 M  +1 -1      mixer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1248940
Comment 10 Christian Esken 2011-08-22 22:28:46 UTC
SVN commit 1248941 by esken:

BUGS: 245383
BUGS: 212944
Fix NPE when decreasing volume. Forward port to trunk.

 M  +14 -27    mixer.cpp  
 M  +1 -1      mixer.h  


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