Bug 319590 - Amarok crashes on close
Summary: Amarok crashes on close
Status: RESOLVED DUPLICATE of bug 319137
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.10.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-09 20:41 UTC by Simon Munton
Modified: 2013-05-09 22:10 UTC (History)
0 users

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


Attachments
Patch that fixes problem (471 bytes, patch)
2013-05-09 20:43 UTC, Simon Munton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Munton 2013-05-09 20:41:24 UTC
When quitting amarok, or when logging out of session, amarok crashes.

Using gdb, I found that crash is caused by passing a NULL pointer as the first argument to XFreePixmap in the function  DialogShadows::Private::freeX11Pixmaps()

Reproducible: Always

Steps to Reproduce:
1. Start amarok
2. Select Quit from menu
3.
Actual Results:  
Amarok crashes

Expected Results:  
Amarok should quit without crashing

Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9819a967c0 (LWP 23781))]

Thread 8 (Thread 0x7f97e6654700 (LWP 23786)):
#0  0x00007f980e1922f2 in g_main_context_iterate.isra.24 () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f980e192434 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f9816ca59b6 in QEventDispatcherGlib::processEvents (this=0x7f97e0000900, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#3  0x00007f9816c7625f in QEventLoop::processEvents (this=this@entry=0x7f97e6653d90, flags=...) at kernel/qeventloop.cpp:149
#4  0x00007f9816c764e8 in QEventLoop::exec (this=this@entry=0x7f97e6653d90, flags=...) at kernel/qeventloop.cpp:204
#5  0x00007f9816b783b0 in QThread::exec (this=this@entry=0x23fdf60) at thread/qthread.cpp:550
#6  0x00007f9816c56c2f in QInotifyFileSystemWatcherEngine::run (this=0x23fdf60) at io/qfilesystemwatcher_inotify.cpp:256
#7  0x00007f9816b7b33c in QThreadPrivate::start (arg=0x23fdf60) at thread/qthread_unix.cpp:338
#8  0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#9  0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f97e4b64700 (LWP 23787)):
#0  0x00007f9813714a94 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9816b7b89b in wait (time=18446744073709551615, this=0x2a23690) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x2a23568, mutex=0x1e88f30, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f9812a62ac1 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2a23540, th=0x1eb5af0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f9812a653cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x1eb5af0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f9812a640bf in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7f97e4b63dc0, parent=0x2a23540, th=th@entry=0x1eb5af0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:87
#6  0x00007f9812a6414b in ThreadWeaver::Thread::run (this=0x1eb5af0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:142
#7  0x00007f9816b7b33c in QThreadPrivate::start (arg=0x1eb5af0) at thread/qthread_unix.cpp:338
#8  0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#9  0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f97dffff700 (LWP 23788)):
#0  0x00007f9813714a94 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9816b7b89b in wait (time=18446744073709551615, this=0x2a23690) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x2a23568, mutex=0x1e88f30, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f9812a62ac1 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2a23540, th=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f9812a653cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f9812a653e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f9812a653e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f9812a653e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f9812a640bf in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7f97dfffedc0, parent=0x2a23540, th=th@entry=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:87
#9  0x00007f9812a6414b in ThreadWeaver::Thread::run (this=0x1d12190) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:142
#10 0x00007f9816b7b33c in QThreadPrivate::start (arg=0x1d12190) at thread/qthread_unix.cpp:338
#11 0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#12 0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f97df7fe700 (LWP 23789)):
#0  0x00007f9813714a94 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9816b7b89b in wait (time=18446744073709551615, this=0x2a23690) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x2a23568, mutex=0x1e88f30, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f9812a62ac1 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2a23540, th=0x2a3b7d0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f9812a653cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x2a3b7d0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f9812a653e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x2a3b7d0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f9812a653e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x2a3b7d0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f9812a640bf in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7f97df7fddc0, parent=0x2a23540, th=th@entry=0x2a3b7d0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:87
#8  0x00007f9812a6414b in ThreadWeaver::Thread::run (this=0x2a3b7d0) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:142
#9  0x00007f9816b7b33c in QThreadPrivate::start (arg=0x2a3b7d0) at thread/qthread_unix.cpp:338
#10 0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#11 0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f97deffd700 (LWP 23790)):
#0  0x00007f9813714a94 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9816b7b89b in wait (time=18446744073709551615, this=0x2a23690) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x2a23568, mutex=0x1e88f30, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f9812a62ac1 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2a23540, th=0x1cfa170) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f9812a653cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1cf58d0, th=0x1cfa170) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f9812a640bf in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7f97deffcdc0, parent=0x2a23540, th=th@entry=0x1cfa170) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:87
#6  0x00007f9812a6414b in ThreadWeaver::Thread::run (this=0x1cfa170) at /home/simon/build/kde4/kdelibs-4.10.3/threadweaver/Weaver/Thread.cpp:142
#7  0x00007f9816b7b33c in QThreadPrivate::start (arg=0x1cfa170) at thread/qthread_unix.cpp:338
#8  0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#9  0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f97dd761700 (LWP 23791)):
#0  0x00007f9813714a94 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f98095f27dd in WTF::TCMalloc_PageHeap::scavengerThread() () from /usr/lib64/qt/lib/libQtWebKit.so.4
#2  0x00007f98095f28e9 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/qt/lib/libQtWebKit.so.4
#3  0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#4  0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f97d75ea700 (LWP 23795)):
#0  0x00007f98162d756d in nanosleep () from /lib64/libc.so.6
#1  0x00007f98162d7411 in sleep () from /lib64/libc.so.6
#2  0x00007f9811a86bb2 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f9811d946a0 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2363
#3  0x00007f9811a86c39 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0x00007f9813710eae in start_thread () from /lib64/libpthread.so.0
#5  0x00007f981630efed in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f9819a967c0 (LWP 23781)):
[KCrash Handler]
#6  0x00007f98181b9e8c in XFreePixmap () from /usr/lib64/libX11.so.6
#7  0x00007f9811f1fffb in DialogShadows::Private::freeX11Pixmaps (this=this@entry=0x26dc730) at /home/simon/build/kde4/kdelibs-4.10.3/plasma/private/dialogshadows.cpp:345
#8  0x00007f9811f222f8 in ~Private (this=0x26dc730, __in_chrg=<optimized out>) at /home/simon/build/kde4/kdelibs-4.10.3/plasma/private/dialogshadows.cpp:46
#9  DialogShadows::~DialogShadows (this=0x26dbfb0, __in_chrg=<optimized out>) at /home/simon/build/kde4/kdelibs-4.10.3/plasma/private/dialogshadows.cpp:97
#10 0x00007f9811f223c9 in DialogShadows::~DialogShadows (this=0x26dbfb0, __in_chrg=<optimized out>) at /home/simon/build/kde4/kdelibs-4.10.3/plasma/private/dialogshadows.cpp:98
#11 0x00007f9816c89b32 in QObjectPrivate::deleteChildren (this=this@entry=0x26dc590) at kernel/qobject.cpp:1907
#12 0x00007f9816c8d9b6 in QObject::~QObject (this=0x2a2e7e0, __in_chrg=<optimized out>) at kernel/qobject.cpp:926
#13 0x00007f9811f83c87 in ~ToolTipManagerSingleton (this=0x2a2e7e0, __in_chrg=<optimized out>) at /home/simon/build/kde4/kdelibs-4.10.3/plasma/tooltipmanager.cpp:109
#14 destroy () at /home/simon/build/kde4/kdelibs-4.10.3/plasma/tooltipmanager.cpp:117
#15 0x00007f9816252c71 in __run_exit_handlers () from /lib64/libc.so.6
#16 0x00007f9816252cf5 in exit () from /lib64/libc.so.6
#17 0x00007f981623aa9c in __libc_start_main () from /lib64/libc.so.6
#18 0x000000000040bb69 in _start () at ../sysdeps/x86_64/elf/start.S:113
Comment 1 Simon Munton 2013-05-09 20:43:40 UTC
Created attachment 79806 [details]
Patch that fixes problem

At the start of  DialogShadows::Private::freeX11Pixmaps(), return if QX11Info::display() returns a NULL pointer
Comment 2 Christoph Feck 2013-05-09 22:10:43 UTC
The patch matches what is proposed at bug 319137.

*** This bug has been marked as a duplicate of bug 319137 ***