Bug 274558 - Marble crashes on exit if MarbleRunners are still active
Summary: Marble crashes on exit if MarbleRunners are still active
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: 1.1.0
Assignee: marble-bugs
URL:
Keywords:
: 274071 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-30 23:16 UTC by Johannes Obermayr
Modified: 2012-01-20 22:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE-4.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Obermayr 2011-05-30 23:16:21 UTC
Application: marble (1.1.80 (1.2 Beta 1))
KDE Platform Version: 4.6.80 (4.7 Beta1) "release 6"
Qt Version: 4.7.3
Operating System: Linux 2.6.37.6-0.5-desktop x86_64
Distribution (Platform): openSUSE RPMs

-- Information about the crash:
Marble crashes each time after closing.

(Make drkonqi happy, happy, happy, happy, happy, ...)

The crash can be reproduced every time.

-- Backtrace:
Application: Marble – Virtueller Globus (marble), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f857b23e760 (LWP 6938))]

Thread 7 (Thread 0x7f8563870700 (LWP 6940)):
#0  0x00007f8576f9b0a4 in __pthread_mutex_lock (mutex=0xaf7988) at pthread_mutex_lock.c:61
#1  0x00007f857227d0b6 in g_main_context_prepare (context=0xaf7980, priority=0x7f856386fcbc) at gmain.c:2763
#2  0x00007f857227dfa9 in g_main_context_iterate (context=0xaf7980, block=1, dispatch=1, self=<value optimized out>) at gmain.c:3071
#3  0x00007f857227e650 in g_main_context_iteration (context=0xaf7980, may_block=1) at gmain.c:3154
#4  0x00007f857938e286 in QEventDispatcherGlib::processEvents (this=0xae9d20, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f85793628d2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f8579362ae5 in QEventLoop::exec (this=0x7f856386fde0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007f85792777a4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#8  0x00007f8579344008 in QInotifyFileSystemWatcherEngine::run (this=0xaea1d0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f857927a095 in QThreadPrivate::start (arg=0xaea1d0) at thread/qthread_unix.cpp:320
#10 0x00007f8576f98a3f in start_thread (arg=0x7f8563870700) at pthread_create.c:297
#11 0x00007f8577c8d67d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f856286e700 (LWP 6948)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f857927a6e2 in wait (this=<value optimized out>, mutex=0x6c3090, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x6c3090, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f857926ef38 in QThreadPoolThread::run (this=0x2eb34d0) at concurrent/qthreadpool.cpp:140
#4  0x00007f857927a095 in QThreadPrivate::start (arg=0x2eb34d0) at thread/qthread_unix.cpp:320
#5  0x00007f8576f98a3f in start_thread (arg=0x7f856286e700) at pthread_create.c:297
#6  0x00007f8577c8d67d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f856186c700 (LWP 6949)):
[KCrash Handler]
#6  0x00007f8579379a1e in QObject::connect (sender=0x271b280, signal=0x7f857a8f3da8 "2reverseGeocodingFinished( GeoDataCoordinates, GeoDataPlacemark)", receiver=0x7f856186bd90, method=0x7f857a8f3d62 "1quit()", type=Qt::AutoConnection) at kernel/qobject.cpp:2489
#7  0x00007f857a8b4241 in Marble::ReverseGeocodingTask::runTask (this=0x3f7acc0, localEventLoop=<value optimized out>) at /usr/src/debug/marble-4.6.80/src/lib/RunnerTask.cpp:66
#8  0x00007f857a8b430a in Marble::RunnerTask::run (this=0x3f7acc0) at /usr/src/debug/marble-4.6.80/src/lib/RunnerTask.cpp:24
#9  0x00007f857926eea8 in QThreadPoolThread::run (this=0x40650b0) at concurrent/qthreadpool.cpp:106
#10 0x00007f857927a095 in QThreadPrivate::start (arg=0x40650b0) at thread/qthread_unix.cpp:320
#11 0x00007f8576f98a3f in start_thread (arg=0x7f856186c700) at pthread_create.c:297
#12 0x00007f8577c8d67d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f856106b700 (LWP 6950)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f857927a6e2 in wait (this=<value optimized out>, mutex=0x6c3090, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x6c3090, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f857926ef38 in QThreadPoolThread::run (this=0x904650) at concurrent/qthreadpool.cpp:140
#4  0x00007f857927a095 in QThreadPrivate::start (arg=0x904650) at thread/qthread_unix.cpp:320
#5  0x00007f8576f98a3f in start_thread (arg=0x7f856106b700) at pthread_create.c:297
#6  0x00007f8577c8d67d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f856206d700 (LWP 6951)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f857927a6e2 in wait (this=<value optimized out>, mutex=0x6c3090, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x6c3090, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f857926ef38 in QThreadPoolThread::run (this=0x8ea110) at concurrent/qthreadpool.cpp:140
#4  0x00007f857927a095 in QThreadPrivate::start (arg=0x8ea110) at thread/qthread_unix.cpp:320
#5  0x00007f8576f98a3f in start_thread (arg=0x7f856206d700) at pthread_create.c:297
#6  0x00007f8577c8d67d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f855e145700 (LWP 6952)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f857927a6e2 in wait (this=<value optimized out>, mutex=0x41f9a10, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x41f9a10, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f857926ef38 in QThreadPoolThread::run (this=0x3f7e850) at concurrent/qthreadpool.cpp:140
#4  0x00007f857927a095 in QThreadPrivate::start (arg=0x3f7e850) at thread/qthread_unix.cpp:320
#5  0x00007f8576f98a3f in start_thread (arg=0x7f855e145700) at pthread_create.c:297
#6  0x00007f8577c8d67d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f857b23e760 (LWP 6938)):
#0  0x00007f8577c84503 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f856ffe6c2a in _xcb_conn_wait (c=0x6caea0, cond=<value optimized out>, vector=0x7fffbe754bd8, count=0x7fffbe754bd4) at xcb_conn.c:313
#2  0x00007f856ffe71a3 in _xcb_out_send (c=0x6caea0, vector=0x7fffbe754c60, count=3) at xcb_out.c:338
#3  0x00007f856ffe7234 in xcb_writev (c=0x6caea0, vector=<value optimized out>, count=<value optimized out>, requests=1) at xcb_out.c:286
#4  0x00007f8574df4cc6 in _XSend (dpy=0x6e6420, data=<value optimized out>, size=<value optimized out>) at xcb_io.c:428
#5  0x00007f8574df5207 in _XReply (dpy=0x6e6420, rep=0x7fffbe754d40, extra=0, discard=1) at xcb_io.c:512
#6  0x00007f8574dd9d63 in XGetSelectionOwner (dpy=0x6e6420, selection=302) at GetSOwner.c:41
#7  0x00007f85787af908 in QClipboard::event (this=0x6bd4e0, e=<value optimized out>) at kernel/qclipboard_x11.cpp:922
#8  0x00007f857872b144 in QApplicationPrivate::notify_helper (this=0x6c1bb0, receiver=0x6bd4e0, e=0x7fffbe755540) at kernel/qapplication.cpp:4462
#9  0x00007f85787336fa in QApplication::notify (this=<value optimized out>, receiver=0x6bd4e0, e=0x7fffbe755540) at kernel/qapplication.cpp:4341
#10 0x00007f857936347c in QCoreApplication::notifyInternal (this=0x7fffbe755620, receiver=0x6bd4e0, event=0x7fffbe755540) at kernel/qcoreapplication.cpp:731
#11 0x00007f857873281b in sendEvent (this=0x7fffbe755620, __in_chrg=<value optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:215
#12 QApplication::~QApplication (this=0x7fffbe755620, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1088
#13 0x0000000000421e21 in main (argc=1, argv=0x7fffbe756c28) at /usr/src/debug/marble-4.6.80/src/kdemain.cpp:278

Reported using DrKonqi
Comment 1 Bernhard Beschow 2011-08-19 19:45:46 UTC
*** Bug 274071 has been marked as a duplicate of this bug. ***
Comment 2 Dennis Nienhüser 2011-12-31 10:02:29 UTC
Git commit 4a1af05a822894d77bacac0932df6d38e74bcc10 by Dennis Nienhüser.
Committed on 31/12/2011 at 10:55.
Pushed by nienhueser into branch 'master'.

Do not unload plugins in PluginManager dtor.

According to qt documentation this is not needed. Not unloading plugins
avoids timing issues at destruction time: Plugin related instances can
be deleted after the deletion of MarbleModel now. Previously
MarbleModel deleted the PluginManager, which unloaded the plugins and
then created dangling pointers for plugin related instances not cleaned
up at that time.

Should be backported to the KDE/4.8 branch after testing.
Related: bug 288542

M  +20   -31   src/lib/PluginManager.cpp

http://commits.kde.org/marble/4a1af05a822894d77bacac0932df6d38e74bcc10
Comment 3 Hussam Al-Tayeb 2012-01-16 10:53:52 UTC
I tried the patch with marble 
Version 1.2.95 (1.3 Release Candidate 1)
Using KDE Development Platform 4.7.98 (4.8 RC2+ (4.7.98)

Now marble process won't exit when I quit the application
Comment 4 Dennis Nienhüser 2012-01-18 21:17:00 UTC
Git commit 8c126cf90013bb231a96270d7574ef011b1c322a by Dennis Nienhüser.
Committed on 31/12/2011 at 10:55.
Pushed by nienhueser into branch 'KDE/4.8'.

Do not unload plugins in PluginManager dtor.

According to qt documentation this is not needed. Not unloading plugins
avoids timing issues at destruction time: Plugin related instances can
be deleted after the deletion of MarbleModel now. Previously
MarbleModel deleted the PluginManager, which unloaded the plugins and
then created dangling pointers for plugin related instances not cleaned
up at that time.

Should be backported to the KDE/4.8 branch after testing.
Related: bug 288542
(cherry picked from commit 4a1af05a822894d77bacac0932df6d38e74bcc10)

M  +20   -31   src/lib/PluginManager.cpp

http://commits.kde.org/marble/8c126cf90013bb231a96270d7574ef011b1c322a
Comment 5 Dennis Nienhüser 2012-01-18 21:17:00 UTC
Git commit 460e57a0ab45eaf606635a52bf0e3f2df5183c8b by Dennis Nienhüser.
Committed on 18/01/2012 at 20:37.
Pushed by nienhueser into branch 'KDE/4.8'.

Do not delete plugin instances. Fixes segfaults with multiple widgets.
(cherry picked from commit 8f5d08a5d4dd8a78536327bd73ac170303655790)
Related: bug 288542
FIXED-IN: KDE-4.8.0

M  +5    -21   src/lib/PluginManager.cpp
M  +2    -0    src/plugins/runner/monav/MonavPlugin.cpp
M  +2    -0    src/plugins/runner/monav/MonavPlugin.h

http://commits.kde.org/marble/460e57a0ab45eaf606635a52bf0e3f2df5183c8b
Comment 6 Dennis Nienhüser 2012-01-20 22:30:37 UTC
Git commit b6d75a4e70bea2bf0313453f5d83b30a5f52deb9 by Dennis Nienhüser.
Committed on 18/01/2012 at 20:37.
Pushed by nienhueser into branch 'Touch/1.3'.

Do not delete plugin instances. Fixes segfaults with multiple widgets.
(cherry picked from commit 8f5d08a5d4dd8a78536327bd73ac170303655790)
Related: bug 288542
FIXED-IN: KDE-4.8.0

M  +5    -21   src/lib/PluginManager.cpp
M  +2    -0    src/plugins/runner/monav/MonavPlugin.cpp
M  +2    -0    src/plugins/runner/monav/MonavPlugin.h

http://commits.kde.org/marble/b6d75a4e70bea2bf0313453f5d83b30a5f52deb9
Comment 7 Dennis Nienhüser 2012-01-20 22:30:37 UTC
Git commit 1246d4e04dbdba4b4a3b6c00f2c105d79794c4b7 by Dennis Nienhüser.
Committed on 31/12/2011 at 10:55.
Pushed by nienhueser into branch 'Touch/1.3'.

Do not unload plugins in PluginManager dtor.

According to qt documentation this is not needed. Not unloading plugins
avoids timing issues at destruction time: Plugin related instances can
be deleted after the deletion of MarbleModel now. Previously
MarbleModel deleted the PluginManager, which unloaded the plugins and
then created dangling pointers for plugin related instances not cleaned
up at that time.

Should be backported to the KDE/4.8 branch after testing.
Related: bug 288542
(cherry picked from commit 4a1af05a822894d77bacac0932df6d38e74bcc10)

M  +20   -31   src/lib/PluginManager.cpp

http://commits.kde.org/marble/1246d4e04dbdba4b4a3b6c00f2c105d79794c4b7