Bug 258641

Summary: Juk crashes when adding items to toolbar via menu right-click
Product: [Applications] juk Reporter: ean5533
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: crash CC: mpyne, rakuco
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.6.5
Sentry Crash Report:

Description ean5533 2010-12-03 03:03:38 UTC
Application: juk (3.5)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-23-generic x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
I was trying to add an item to Juk's playlist toolbar by right-clicking on an item in the menu and clicking add. Any time I try to add an item to the playlist toolbar in that fashion the program crashes. Adding them by using the Configure Toolbars window does NOT crash the program.

The crash can be reproduced every time.

-- Backtrace:
Application: JuK (juk), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f6d936e3780 (LWP 21594))]

Thread 11 (Thread 0x7f6d7b373710 (LWP 21595)):
#0  0xffffffffff60014c in ?? ()
#1  0x00007f6d7b372a70 in ?? ()
#2  0x00007fff44fff852 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

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

Thread 9 (Thread 0x7f6d6bdb8710 (LWP 21597)):
#0  0x00007f6d8d0e2665 in __pthread_mutex_lock (mutex=0x2a5b8f8) at pthread_mutex_lock.c:61
#1  0x00007f6d8a030a43 in g_main_context_prepare () from /lib/libglib-2.0.so.0
#2  0x00007f6d8a030e78 in ?? () from /lib/libglib-2.0.so.0
#3  0x00007f6d8a03145c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#4  0x00007f6d903de1e6 in QEventDispatcherGlib::processEvents (this=0x2a5f190, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007f6d903b0a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007f6d903b0dec in QEventLoop::exec (this=0x7f6d6bdb7d70, flags=) at kernel/qeventloop.cpp:201
#7  0x00007f6d902bb2fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f6d7a29b2b0 in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#9  0x00007f6d902be27e in QThreadPrivate::start (arg=0x2a5a2a0) at thread/qthread_unix.cpp:266
#10 0x00007f6d8d0e0971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007f6d8f59294d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f6d6b3b2710 (LWP 21598)):
#0  0x00007f6d8f586203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f6d8cec440f in ?? () from /usr/lib/libpulse.so.0
#2  0x00007f6d8ceb3d76 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3  0x00007f6d8ceb57f9 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4  0x00007f6d8ceb58b0 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#5  0x00007f6d8cec420b in ?? () from /usr/lib/libpulse.so.0
#6  0x00007f6d87bc7fb8 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#7  0x00007f6d8d0e0971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#8  0x00007f6d8f59294d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

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

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

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

Thread 4 (Thread 0x7f6d651ab710 (LWP 21602)):
#0  __libc_disable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:95
#1  0x00007f6d8f58621b in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=2) at ../sysdeps/unix/sysv/linux/poll.c:89
#2  0x00007f6d8cec440f in ?? () from /usr/lib/libpulse.so.0
#3  0x00007f6d8ceb3d76 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#4  0x00007f6d8ceb57f9 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#5  0x00007f6d8ceb58b0 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#6  0x00007f6d8cec420b in ?? () from /usr/lib/libpulse.so.0
#7  0x00007f6d87bc7fb8 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#8  0x00007f6d8d0e0971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f6d8f59294d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

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

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

Thread 1 (Thread 0x7f6d936e3780 (LWP 21594)):
[KCrash Handler]
#6  0x00007f6d920d59be in KDEPrivate::KMenuMenuHandler::slotAddToToolBar (this=<value optimized out>, tb=<value optimized out>) at ../../kdeui/xmlgui/kmenumenuhandler_p.cpp:156
#7  0x00007f6d920d634b in KDEPrivate::KMenuMenuHandler::qt_metacall (this=0x26b4d90, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff44f5fa20) at ./kmenumenuhandler_p.moc:78
#8  0x00007f6d903c9b27 in QMetaObject::activate (sender=0x26b4270, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x84e00) at kernel/qobject.cpp:3280
#9  0x00007f6d91ed6621 in KSelectAction::triggered (this=0x26a5470, _t1=1) at ./kselectaction.moc:183
#10 0x00007f6d91ed75d4 in KSelectAction::actionTriggered (this=0x26b4270, action=0x2f21940) at ../../kdeui/actions/kselectaction.cpp:331
#11 0x00007f6d91ed9385 in KSelectAction::qt_metacall (this=0x26b4270, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff44f5fbf0) at ./kselectaction.moc:121
#12 0x00007f6d903c9b27 in QMetaObject::activate (sender=0x26b4dc0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x84e00) at kernel/qobject.cpp:3280
#13 0x00007f6d9126274f in QActionGroup::triggered (this=0x26a5470, _t1=0x2f21940) at .moc/release-shared/moc_qactiongroup.cpp:146
#14 0x00007f6d91262b37 in QActionGroupPrivate::_q_actionTriggered (this=<value optimized out>) at kernel/qactiongroup.cpp:93
#15 0x00007f6d91262e71 in QActionGroup::qt_metacall (this=0x26b4dc0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff44f5fd50) at .moc/release-shared/moc_qactiongroup.cpp:101
#16 0x00007f6d903c9b27 in QMetaObject::activate (sender=0x2f21940, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x84e00) at kernel/qobject.cpp:3280
#17 0x00007f6d9125d852 in QAction::triggered (this=0x26a5470, _t1=true) at .moc/release-shared/moc_qaction.cpp:263
#18 0x00007f6d9125ef5b in QAction::activate (this=0x2f21940, event=<value optimized out>) at kernel/qaction.cpp:1256
#19 0x00007f6d916c5dc1 in QMenuPrivate::activateCausedStack (this=<value optimized out>, causedStack=..., action=0x2f21940, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:993
#20 0x00007f6d916cb782 in QMenuPrivate::activateAction (this=0x26980e0, action=0x2f21940, action_e=QAction::Trigger, self=<value optimized out>) at widgets/qmenu.cpp:1085
#21 0x00007f6d92097cee in KMenu::mouseReleaseEvent (this=0x26ddd30, e=0x0) at ../../kdeui/widgets/kmenu.cpp:471
#22 0x00007f6d912bb04e in QWidget::event (this=0x26ddd30, event=0x7fff44f609a0) at kernel/qwidget.cpp:8187
#23 0x00007f6d916cd90b in QMenu::event (this=0x26ddd30, e=0x7fff44f609a0) at widgets/qmenu.cpp:2410
#24 0x00007f6d91264fdc in QApplicationPrivate::notify_helper (this=0x2622f80, receiver=0x26ddd30, e=0x7fff44f609a0) at kernel/qapplication.cpp:4396
#25 0x00007f6d9126b30e in QApplication::notify (this=0x7fff44f61680, receiver=0x26ddd30, e=0x7fff44f609a0) at kernel/qapplication.cpp:3959
#26 0x00007f6d91fb7156 in KApplication::notify (this=0x7fff44f61680, receiver=0x26ddd30, event=0x7fff44f609a0) at ../../kdeui/kernel/kapplication.cpp:310
#27 0x00007f6d903b1cdc in QCoreApplication::notifyInternal (this=0x7fff44f61680, receiver=0x26ddd30, event=0x7fff44f609a0) at kernel/qcoreapplication.cpp:732
#28 0x00007f6d91269dbe in sendEvent (receiver=0x26ddd30, event=0x7fff44f609a0, alienWidget=0x0, nativeWidget=0x26ddd30, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#29 QApplicationPrivate::sendMouseEvent (receiver=0x26ddd30, event=0x7fff44f609a0, alienWidget=0x0, nativeWidget=0x26ddd30, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:3058
#30 0x00007f6d912ed7bd in QETWidget::translateMouseEvent (this=0x26ddd30, event=<value optimized out>) at kernel/qapplication_x11.cpp:4337
#31 0x00007f6d912ebc5c in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff44f612c0) at kernel/qapplication_x11.cpp:3536
#32 0x00007f6d913180e2 in x11EventSourceDispatch (s=0x2626900, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#33 0x00007f6d8a02d342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#34 0x00007f6d8a0312a8 in ?? () from /lib/libglib-2.0.so.0
#35 0x00007f6d8a03145c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#36 0x00007f6d903de193 in QEventDispatcherGlib::processEvents (this=0x25f1c30, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#37 0x00007f6d91317a4e in QGuiEventDispatcherGlib::processEvents (this=0x26a5470, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x00007f6d903b0a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#39 0x00007f6d903b0dec in QEventLoop::exec (this=0x7fff44f615f0, flags=) at kernel/qeventloop.cpp:201
#40 0x00007f6d903b4ebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#41 0x00000000004766b3 in ?? ()
#42 0x00007f6d8f4cad8e in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff44f61d48) at libc-start.c:226
#43 0x000000000042ab89 in _start ()

Reported using DrKonqi
Comment 1 Raphael Kubo da Costa 2011-06-18 17:23:55 UTC
Can you still reproduce this crash?
Comment 2 ean5533 2011-06-18 17:32:52 UTC
I no longer have KDE or Juk installed, so I can't test it again.
Comment 3 ean5533 2011-06-18 17:35:07 UTC
I no longer have KDE or Juk installed, so I can't test it again.
Comment 4 Γιώργος Κυλάφας (Giorgos Kylafas) 2011-06-19 13:29:39 UTC
SVN commit 1237516 by kylafas:

juk: fix crash when adding items to toolbars with RMB.

When adding an item to a toolbar using right-click, the KXMLGUIClient
object of the global action collection is accessed.
(see KMenuMenuHandler::slotAddToToolBar() )
The way the action collection was created meant the object was NULL,
which resulted in crashes.
So, create the action collection with KXMLGUIClient::actionCollection(),
which properly sets the object.

CCBUG: 258641

 M  +11 -2     actioncollection.cpp  
 M  +0 -5      juk.cpp  
 M  +0 -1      juk.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1237516
Comment 5 Γιώργος Κυλάφας (Giorgos Kylafas) 2011-06-27 21:24:02 UTC
SVN commit 1238534 by kylafas:

juk: fix crash when adding items to toolbars with RMB.

When adding an item to a toolbar using right-click, the KXMLGUIClient
object of the global action collection is accessed.
(see KMenuMenuHandler::slotAddToToolBar() )
The way the action collection was created meant the object was NULL,
which resulted in crashes.
So, create the action collection with KXMLGUIClient::actionCollection(),
which properly sets the object.

This is a backport of r1237516 from trunk to branch 4.6 (KDE SC 4.6.5).

BUG: 258641
FIXED-IN: 4.6.5

 M  +11 -2     actioncollection.cpp  
 M  +0 -5      juk.cpp  
 M  +0 -1      juk.h  


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