Bug 267460 - Segfault when closing rekonq
Summary: Segfault when closing rekonq
Status: RESOLVED DUPLICATE of bug 269490
Alias: None
Product: rekonq
Classification: Unclassified
Component: general (show other bugs)
Version: latest git snapshot
Platform: Archlinux Packages Linux
: NOR normal (vote)
Target Milestone: 0.7
Assignee: Andrea Diamantini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 13:23 UTC by Cédric Bellegarde
Modified: 2011-04-26 11:41 UTC (History)
0 users

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 Cédric Bellegarde 2011-03-02 13:23:31 UTC
Version:           latest git snapshot (using KDE 4.6.0) 
OS:                Linux

When i close rekonq, sometime, it segfault...

Reproducible: Sometimes




Application: rekonq (rekonq), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f60c4196760 (LWP 1010))]

Thread 5 (Thread 0x7f60b05f6700 (LWP 1011)):
#0  0x00007f60bda6a34c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f60c2fc0a64 in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007f60bda65cb0 in start_thread () from /lib/libpthread.so.0
#3  0x00007f60bd02e95d in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f60aede5700 (LWP 1012)):
#0  0x00007f60bda6a34c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f60c39815f4 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007f60c3981629 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007f60bda65cb0 in start_thread () from /lib/libpthread.so.0
#4  0x00007f60bd02e95d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f609f5bd700 (LWP 1065)):
#0  0x00007f60bda6a34c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f60bdceec3b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f60be114034 in ?? () from /usr/lib/libthreadweaver.so.4
#3  0x00007f60be1166c3 in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x00007f60be1154af in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x00007f60be115538 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#6  0x00007f60bdcee54e in ?? () from /usr/lib/libQtCore.so.4
#7  0x00007f60bda65cb0 in start_thread () from /lib/libpthread.so.0
#8  0x00007f60bd02e95d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f609ea2b700 (LWP 1068)):
#0  0x00007f60bda6a34c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f60bdceec3b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f60be114034 in ?? () from /usr/lib/libthreadweaver.so.4
#3  0x00007f60be1166c3 in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x00007f60be1154af in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x00007f60be115538 in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#6  0x00007f60bdcee54e in ?? () from /usr/lib/libQtCore.so.4
#7  0x00007f60bda65cb0 in start_thread () from /lib/libpthread.so.0
#8  0x00007f60bd02e95d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f60c4196760 (LWP 1010)):
[KCrash Handler]
#6  0x00007f60bf3ac999 in QRasterWindowSurface::~QRasterWindowSurface() () from /usr/lib/libQtGui.so.4
#7  0x00007f60bf3aca19 in QRasterWindowSurface::~QRasterWindowSurface() () from /usr/lib/libQtGui.so.4
#8  0x00007f60bf3c6e52 in ?? () from /usr/lib/libQtGui.so.4
#9  0x00007f60bf204b49 in ?? () from /usr/lib/libQtGui.so.4
#10 0x00007f60bf204c99 in QWidgetPrivate::deleteExtra() () from /usr/lib/libQtGui.so.4
#11 0x00007f60bf204edc in QWidgetPrivate::~QWidgetPrivate() () from /usr/lib/libQtGui.so.4
#12 0x00007f60bf5f945d in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f60bddee433 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#14 0x00007f60bf20729d in QWidget::~QWidget() () from /usr/lib/libQtGui.so.4
#15 0x00007f60bff9fd59 in KMenu::~KMenu() () from /usr/lib/libkdeui.so.5
#16 0x00007f60bfdf67c6 in KActionMenu::~KActionMenu() () from /usr/lib/libkdeui.so.5
#17 0x00007f60c0f1dce9 in KBookmarkActionMenu::~KBookmarkActionMenu() () from /usr/lib/libkio.so.5
#18 0x00007f60bdde98a4 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#19 0x00007f60bddee3e2 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#20 0x00007f60c3d5b959 in BookmarkProvider::~BookmarkProvider() () from /usr/lib/libkdeinit4_rekonq.so
#21 0x00007f60bdde98a4 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#22 0x00007f60bddee3e2 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#23 0x00007f60bf1c40a4 in QApplication::~QApplication() () from /usr/lib/libQtGui.so.4
#24 0x00007f60c3d0bdff in Application::~Application() () from /usr/lib/libkdeinit4_rekonq.so
#25 0x00007f60c3d927e0 in kdemain () from /usr/lib/libkdeinit4_rekonq.so
#26 0x00007f60bcf79dcd in __libc_start_main () from /lib/libc.so.6
#27 0x00000000004007e9 in _start ()
Comment 1 Cédric Bellegarde 2011-03-02 13:24:35 UTC
Git commit ac57e2cc767405b8eadce5f5d6fd32c8f702a93e by Cedric Bellegarde.
Committed on 02/03/2011 at 13:22.
Pushed by cedric into branch 'master'.

delete bookmarkProvider sooner to prevent segfault
BUG:267460

M  +2    -0    src/application.cpp     

http://commits.kde.org/rekonq/ac57e2cc767405b8eadce5f5d6fd32c8f702a93e
Comment 2 Andrea Diamantini 2011-03-02 16:45:32 UTC
I cannot understand how this commit can fix this bug. Can you pls explain me?
Comment 3 Cédric Bellegarde 2011-03-02 20:00:35 UTC
~Application() call ~QApplication() before calling ~BookmarkProvider()

~BookmarkProvider() call ~QRasterWindowSurface() that seems to need QApplication...

http://bugreports.qt.nokia.com/browse/QTBUG-16974
Comment 4 Andrea Diamantini 2011-03-02 23:39:03 UTC
As you can notice, the bug you are referring has been closed as invalid.
In fact the right sequence is:
~Application() finishes and starts ~QApplication().
~QApplication() finishes and starts ~QObject().
~QObject() destroys before closing ALL its children, so also the BookmarkProvider.

Forcing a faster call to ~BookmarkProvider() maybe dangerous, cause of some parts of the Application that can try yet using it.
The right fix imho should be "reparent" the GUI objects depending on BookmarkProvider to the MainWindow they belong.
Comment 5 Cédric Bellegarde 2011-03-03 09:52:26 UTC
Ok, will give a look for a better fix.
Comment 6 Andrea Diamantini 2011-03-03 16:54:28 UTC
Many thanks for :)
Comment 7 Andrea Diamantini 2011-03-10 23:59:01 UTC
Cedric, can you yet reproduce it?
Comment 8 Cédric Bellegarde 2011-04-04 09:54:01 UTC
Yes, i don't understand what is really  happening :-(
Comment 9 Cédric Bellegarde 2011-04-04 09:55:31 UTC
Sorry for previous comment, i was wrong...

I think your idea is good ("reparent" the GUI objects depending on
BookmarkProvider to the MainWindow they belong.) but don't know how this should be done...
Comment 10 Cédric Bellegarde 2011-04-26 11:41:03 UTC

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