Bug 340191 - Plasmashell in standalone application mode crashes on exit
Summary: Plasmashell in standalone application mode crashes on exit
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-21 09:29 UTC by Bhushan Shah
Modified: 2014-10-23 12:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bhushan Shah 2014-10-21 09:29:42 UTC
Thread 1 (Thread 0x7fcced56d7c0 (LWP 5466)):
[KCrash Handler]
#6  0x00007fcce6ababb9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007fcce6abdfc8 in __GI_abort () at abort.c:89
#8  0x00007fcce6af7e14 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fcce6c06668 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#9  0x00007fcce6b040ee in malloc_printerr (ptr=<optimized out>, str=0x7fcce6c06798 "double free or corruption (out)", action=1) at malloc.c:4996
#10 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#11 0x0000000000462588 in StandaloneAppCorona::~StandaloneAppCorona (this=0x7fff848ea3a0, __in_chrg=<optimized out>) at /home/mck182/kf5-dev/src/plasma-workspace/shell/standaloneappcorona.h:34
#12 0x00007fcce74abb3c in qDeleteInEventHandler (o=0x7fff848ea3a0) at kernel/qobject.cpp:4345
#13 0x00007fcce74a38ca in QObject::event (this=0x7fff848ea3a0, e=0x34f07f0) at kernel/qobject.cpp:1232
#14 0x00007fcce80b883a in QApplicationPrivate::notify_helper (this=0x25cc950, receiver=0x7fff848ea3a0, e=0x34f07f0) at kernel/qapplication.cpp:3522
#15 0x00007fcce80b5e82 in QApplication::notify (this=0x7fff848ea370, receiver=0x7fff848ea3a0, e=0x34f07f0) at kernel/qapplication.cpp:2975
#16 0x00007fcce746842a in QCoreApplication::notifyInternal (this=0x7fff848ea370, receiver=0x7fff848ea3a0, event=0x34f07f0) at kernel/qcoreapplication.cpp:935
#17 0x00007fcce746bfb7 in QCoreApplication::sendEvent (receiver=0x7fff848ea3a0, event=0x34f07f0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237
#18 0x00007fcce74696f5 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x25c3080) at kernel/qcoreapplication.cpp:1539
#19 0x00007fcce746909a in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1397
#20 0x00007fcce74de27c in postEventSourceDispatch (s=0x26283d0) at kernel/qeventdispatcher_glib.cpp:279
#21 0x00007fcce22b5e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fcce22b6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fcce22b60ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007fcce74dea1d in QEventDispatcherGlib::processEvents (this=0x2627bb0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#25 0x00007fccdb2c83de in QPAEventDispatcherGlib::processEvents (this=0x2627bb0, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:123
#26 0x00007fcce7465162 in QEventLoop::processEvents (this=0x7fff848ea220, flags=...) at kernel/qeventloop.cpp:136
#27 0x00007fcce7465423 in QEventLoop::exec (this=0x7fff848ea220, flags=...) at kernel/qeventloop.cpp:212
#28 0x00007fcce7468ae2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#29 0x00007fcce784e4e6 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1450
#30 0x00007fcce80b56a3 in QApplication::exec () at kernel/qapplication.cpp:2767
#31 0x0000000000461a36 in main (argc=4, argv=0x7fff848ea508) at /home/mck182/kf5-dev/src/plasma-workspace/shell/main.cpp:138

Thanks to mck182 for backtrace
Comment 1 Marco Martin 2014-10-23 12:37:24 UTC
Git commit a20ceb23493324c09d95e3a0440e8d6dca93a31f by Marco Martin.
Committed on 23/10/2014 at 12:25.
Pushed by mart into branch 'Plasma/5.1'.

crash--, create the corona on heap

creating the corona on the stack makes the app crash on close, because
the corona tries to delete itself when the window closes.
this also meand this code will *not* leak

M  +3    -1    shell/main.cpp
M  +5    -0    shell/standaloneappcorona.cpp
M  +2    -0    shell/standaloneappcorona.h

http://commits.kde.org/plasma-workspace/a20ceb23493324c09d95e3a0440e8d6dca93a31f