Bug 319137 - Crash when quitting Amarok or plasma [DialogShadows::Private::freeX11Pixmaps()]
Summary: Crash when quitting Amarok or plasma [DialogShadows::Private::freeX11Pixmaps()]
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: general (show other bugs)
Version: 4.10.3
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
: 319475 319517 319590 319607 319629 319641 319697 319920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-01 00:03 UTC by Christoph Feck
Modified: 2013-05-17 09:33 UTC (History)
18 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2013-05-01 00:03:17 UTC
Application: kded4 (4.10.60)
KDE Platform Version: 4.10.60 (Compiled from sources)
Qt Version: 4.8.4
Operating System: Linux 3.8.9-1-desktop i686
Distribution: "openSUSE 12.2 (i586)"

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

After recent change in master, I got this crash when exiting kded4. I guess the X connection has already been closed when the global static exit handlers are called.

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Daemon (kded4), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb52e9740 (LWP 15518))]

Thread 2 (Thread 0xaf2ffb40 (LWP 16021)):
#0  0xb774d424 in __kernel_vsyscall ()
#1  0xb5dfa80b in poll () from /lib/libc.so.6
#2  0xb575f23b in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb5750af0 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb5750c51 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb6cff75f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb6ccc23c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb6ccc531 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb6bb7b5c in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xb6caa78d in ?? () from /usr/lib/libQtCore.so.4
#10 0xb6bbaf68 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6b38e32 in start_thread () from /lib/libpthread.so.0
#12 0xb5e057ee in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb52e9740 (LWP 15518)):
[KCrash Handler]
#6  0xb71bc144 in XFreePixmap () from /usr/lib/libX11.so.6
#7  0xb46a1c3d in DialogShadows::Private::freeX11Pixmaps() () from /local/KDE4/trunk/lib/libplasma.so.3
#8  0xb46a45f0 in DialogShadows::~DialogShadows() () from /local/KDE4/trunk/lib/libplasma.so.3
#9  0xb46a4749 in ._276::destroy() () from /local/KDE4/trunk/lib/libplasma.so.3
#10 0xb4615269 in KCleanUpGlobalStatic::~KCleanUpGlobalStatic() () from /local/KDE4/trunk/lib/libplasma.so.3
#11 0xb5d4c341 in __run_exit_handlers () from /lib/libc.so.6
#12 0xb5d4c3cd in exit () from /lib/libc.so.6
#13 0x0804fa0f in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) ()
#14 0x08050794 in handle_launcher_request(int, char const*) [clone .isra.13] ()
#15 0x08050e3f in handle_requests(int) ()
#16 0x0804c720 in main ()

Reported using DrKonqi
Comment 1 Christoph Feck 2013-05-01 00:04:49 UTC
Probably caused by 4cd97cd6233ae24f1481d2c9fe956c7c48d1127f
Comment 2 Christoph Feck 2013-05-01 11:00:19 UTC
Also adding kwin maintainers, because of commit b29820e09a0a0e355f6c8e743ca142af89118290
Comment 3 Thomas Lübking 2013-05-01 11:57:38 UTC
Do you have ebca90e1a50435f27cbfa2e8f3e599c1c037542b ?
Comment 4 Christoph Feck 2013-05-04 12:33:31 UTC
Happens with today's master. Both plasma-desktop and kded4 get this crash when terminated.
Comment 5 Thomas Lübking 2013-05-04 18:02:13 UTC
tried?

plasma/private/dialogshadows.cpp

void DialogShadows::Private::freeX11Pixmaps()
{
#ifdef Q_WS_X11
+    if (!QX11Info::display())
+       return;
    foreach (const QPixmap &pixmap, m_shadowPixmaps) {
        if (!pixmap.isNull()) {
            XFreePixmap(QX11Info::display(), pixmap.handle());
        }
    }
Comment 6 Aleix Pol 2013-05-05 15:09:16 UTC
I had this problem as well (plasmoidviewer alone can reproduce it).

I also can confirm Thomas's patch fixes the problem here, I'm unsure if it adds different problems, though.

I'd suggest to open a review board, to make plasma developers know about it.
Comment 7 Aleix Pol 2013-05-05 15:17:00 UTC
I was wrong, it only fixes the problem if plasmoidviewer is empty, if I open it with a plasmoid it keeps happening.
Comment 8 Aleix Pol 2013-05-05 15:24:54 UTC
It did fix the problem, it was my plasmoid crashing now, my bad. :)

So please, reviewboard!
Comment 9 Thomas Lübking 2013-05-05 16:16:25 UTC
I'd say to have Cchristoph confirm and then just some plasma developer commit & push it?
Comment 10 Martin Flöser 2013-05-09 09:21:47 UTC
*** Bug 319475 has been marked as a duplicate of this bug. ***
Comment 11 Anne-Marie Mahfouf 2013-05-09 09:27:20 UTC
Also happens in 4.10 branch which makes it a regression, too bad it will happen in 4.10.3 which was tagged today.
Comment 12 Hrvoje Senjan 2013-05-09 09:36:18 UTC
(In reply to comment #5)
> tried?

Works here with plasma and Amarok -> no crashes
Comment 13 Martin Flöser 2013-05-09 10:34:40 UTC
> Also happens in 4.10 branch which makes it a regression, too bad it will
> happen in 4.10.3 which was tagged today.
4.10.3 got already tagged a week ago, in fact it got tagged before this 
problem was identified. The crash cannot be reproduces on each system, e.g. I 
can restart plasma without crashes.
Comment 14 Hrvoje Senjan 2013-05-09 10:41:10 UTC
(In reply to comment #13)
>The crash cannot be reproduces on each system, e.g.  I 
> can restart plasma without crashes.
Same was here (plasma crash didn't happen always), but Amarok crashing at exit was  reproducible every time (see duplicate bug 319475)
Comment 15 Christoph Feck 2013-05-09 22:10:43 UTC
*** Bug 319590 has been marked as a duplicate of this bug. ***
Comment 16 Egor Y. Egorov 2013-05-10 05:40:30 UTC
On my gentoo some issue with kde-4.10.3: kquitapp plasma-desktop cause crash pasma. kde-4.10.2 is not subject to this.
Comment 17 Thomas Lübking 2013-05-10 10:18:37 UTC
see, try and confirm or deny comment #5
Comment 18 Rex Dieter 2013-05-10 12:07:49 UTC
Suggested patch/fix/workaround from comment #5 seems to work as advertised for me.
Comment 19 Anne-Marie Mahfouf 2013-05-10 12:11:41 UTC
Bug https://bugs.kde.org/show_bug.cgi?id=319590 which is a duplicate proposed the same patch than comment #5.
Comment 20 Anne-Marie Mahfouf 2013-05-10 12:52:12 UTC
Tested and made a review request
https://git.reviewboard.kde.org/r/110382/
Comment 21 Mark Kretschmann 2013-05-10 14:52:04 UTC
*** Bug 319629 has been marked as a duplicate of this bug. ***
Comment 22 Joachim Mairböck 2013-05-10 14:55:18 UTC
*** Bug 319517 has been marked as a duplicate of this bug. ***
Comment 23 Jekyll Wu 2013-05-10 15:01:07 UTC
*** Bug 319607 has been marked as a duplicate of this bug. ***
Comment 24 Anne-Marie Mahfouf 2013-05-10 15:07:01 UTC
Git commit a9c9608e83137f45203b3f0a6130ac62447c7d3a by Anne-Marie Mahfouf.
Committed on 10/05/2013 at 17:04.
Pushed by annma into branch 'master'.

Fix crash when quitting apps
REVIEW: 110382

M  +3    -0    plasma/private/dialogshadows.cpp

http://commits.kde.org/kdelibs/a9c9608e83137f45203b3f0a6130ac62447c7d3a
Comment 25 Anne-Marie Mahfouf 2013-05-10 15:15:38 UTC
Git commit 9323adac35d40da69e3cb18504340e984c4afd05 by Anne-Marie Mahfouf.
Committed on 10/05/2013 at 17:12.
Pushed by annma into branch 'KDE/4.10'.

Fix crash when quitting apps

Backport to 4.10 branch

M  +3    -0    plasma/private/dialogshadows.cpp

http://commits.kde.org/kdelibs/9323adac35d40da69e3cb18504340e984c4afd05
Comment 26 Christoph Feck 2013-05-10 20:34:42 UTC
*** Bug 319641 has been marked as a duplicate of this bug. ***
Comment 27 Jekyll Wu 2013-05-12 08:36:36 UTC
*** Bug 319697 has been marked as a duplicate of this bug. ***
Comment 28 Jekyll Wu 2013-05-17 09:33:51 UTC
*** Bug 319920 has been marked as a duplicate of this bug. ***