Bug 172692 - Konqueror crashes and strange behavior on toolbar operations
Summary: Konqueror crashes and strange behavior on toolbar operations
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.1.2
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 178765 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-13 02:08 UTC by Erik Boritsch
Modified: 2012-01-10 00:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1


Attachments
konqueror.rc that makes Konqueror crash at startup (4.20 KB, application/xml)
2009-11-20 15:32 UTC, esigra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Boritsch 2008-10-13 02:08:35 UTC
Version:            (using KDE 4.1.2)
Compiler:          gcc-4.1.2 
OS:                Linux
Installed from:    Gentoo Packages

I experience strange behavior of konqueror-4.1.2 when I try to manage toolbars. The following pattern is reproducible in my case:
- Go to Toolbar Settings
- Remove Location Bar from Location Toolbar
- Add Location Bar to Main Toolbar and click OK
- Settings - Toolbars - uncheck Location Toolbar
- Close Konqueror (sometimes but not always I get a crash)
- Start Konqueror again
I see no Location Bar anymore.
If I go to Toolbar Settings again and try to add/remove elements to main Toolbar, I experience crashes almost every time I hit Apply (provided i don't remove location bar).
Comment 1 Sebastian Sauer 2008-10-27 14:48:18 UTC
Confirmed. The reason is, that in konqmainwindow.cpp we do;
m_combo->setParent( toolBar("locationToolBar") );

what means, that our m_combo is parent of the toolbar and will be destroyed once the toolbar itself is. It seems all or at least a lot of the code within konqmainwindow.cpp assumes that we have always a valid m_combo-instance around.

I see two ways to fix it;
1. check everywhere for m_combo==NULL or
2. be sure m_combo stays around even after the locationToolBar got removed.

Sample backtrace;
[KCrash Handler]
#5  0x00007f67b5e0b20b in QWidget::testAttribute (this=0x0, attribute=Qt::WA_WState_Visible) at /home/kde4/qt4-copy/include/QtGui/qwidget.h:992
#6  0x00007f67b5e0b25c in QWidget::isVisible (this=0x0) at /home/kde4/qt4-copy/include/QtGui/qwidget.h:954
#7  0x00007f67b5e3391c in KonqMainWindow::focusLocationBar (this=0x7cd850) at /home/kde4/svn/_src/KDE/kdebase/apps/konqueror/src/konqmainwindow.cpp:3423
#8  0x00007f67b5e33971 in KonqMainWindow::slotLocationLabelActivated (this=0x7cd850) at /home/kde4/svn/_src/KDE/kdebase/apps/konqueror/src/konqmainwindow.cpp:5216
#9  0x00007f67b5e4d3e6 in KonqMainWindow::qt_metacall (this=0x7cd850, _c=QMetaObject::InvokeMetaMethod, _id=66, _a=0x7fffbe2db060)
    at /home/kde4/svn/_build/kdebase/apps/konqueror/src/konqmainwindow.moc:398
Comment 2 Erik Boritsch 2008-11-11 22:21:50 UTC
4.1.3 still has the issue.
Comment 3 Dario Andres 2008-12-25 21:26:11 UTC
I've experienced this bug here using (after trying to reproduce 177837):

Qt: 4.4.3
KDE: 4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221))
kdelibs svn rev. 901348 / kdebase svn rev. 901348
on ArchLinux x86_64 - Kernel 2.6.27.10

- Clear your Konqueror configuration (delete ~/.kde/share/apps/konqueror)
- Open Konqueror
- Go to Configure Toolbars
- Select Main Toolbar
- Add "Location Bar"
- Add "Go"
- Click OK
- Disable the "Location" toolbar (RMB on the toolbars, "Toolbars", disable "Location")
- Close Konqueror

Try to start Konqueror again. Crash! (you can't start Konqi again util you clean your Konqueror configuration)

Backtrace:

ASSERT: "id" in file kernel/qwidget_x11.cpp, line 751

Application: Konqueror (konqueror), signal SIGABRT
0x00007fa6a0bfbfd0 in __nanosleep_nocancel () from /lib/libc.so.6

Thread 1 (Thread 0x7fa6a5c77750 (LWP 5468)):
[KCrash Handler]
#5  0x00007fa6a0b8f0c5 in raise () from /lib/libc.so.6
#6  0x00007fa6a0b905e3 in abort () from /lib/libc.so.6
#7  0x00007fa6a32b8a25 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2102
#8  0x00007fa6a32b8b47 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2303
#9  0x00007fa6a27d26d0 in QWidgetPrivate::create_sys (this=0x20fa690, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget_x11.cpp:751
#10 0x00007fa6a27a3152 in QWidget::create (this=0x2108ad0, window=0, initializeWindow=6, destroyOldWindow=255) at kernel/qwidget.cpp:1236
#11 0x00007fa6a279f9bd in QWidgetPrivate::createWinId (this=<value optimized out>, winid=0) at kernel/qwidget.cpp:2005
#12 0x00007fa6a27d30f6 in QWidgetPrivate::setParent_sys (this=0x20fa690, parent=0x23647f0, f={i = -1378119808}) at kernel/qwidget_x11.cpp:952
#13 0x00007fa6a27a6296 in QWidget::setParent (this=0x2108ad0, parent=0x23647f0, f={i = -1378119728}) at kernel/qwidget.cpp:8735
#14 0x00007fa6a27a6812 in QWidget::setParent (this=0x155c, parent=0x155c) at kernel/qwidget.cpp:8696
#15 0x00007fa6a5947871 in KonqMainWindow (this=0x2004a80, initialURL=@0x7fffaddb91b0, xmluiFile=@0x7fffaddb9250) at /home/kde-devel/kde/src/KDE/kdebase/apps/konqueror/src/konqmainwindow.cpp:274
#16 0x00007fa6a58fc9e5 in KonqMisc::createBrowserWindowFromProfile (_path=<value optimized out>, filename=@0x7fffaddb9770, url=@0x7fffaddb9640, args=<value optimized out>, 
    browserArgs=@0x7fffaddb94b0, forbidUseHTML=false, filesToSelect=@0x7fffaddb9860, tempFile=false, openUrl=true) at /home/kde-devel/kde/src/KDE/kdebase/apps/konqueror/src/konqmisc.cpp:150
#17 0x00007fa6a5971fe8 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /home/kde-devel/kde/src/KDE/kdebase/apps/konqueror/src/konqmain.cpp:205
#18 0x00007fa6a0b7b546 in __libc_start_main () from /lib/libc.so.6
#19 0x00000000004007c9 in _start ()
Comment 4 qqqqqqqqq9 2009-02-17 11:38:55 UTC
Hi,

i have the same problem, but only when the searchbar plugin is enabled. 

cp /usr/share/kde4/apps/konqueror/kpartplugins/searchbar.rc ~/.kde4/share/config/

and changing the name in searchbar.rc from 

<ToolBar fullWidth="true" name="locationToolBar" 

to

<ToolBar fullWidth="true" name="Main ToolBar"

solved the problem for me.
Comment 5 Marcus Harrison 2009-03-18 11:56:36 UTC
I can confirm this in KDE 4.2.1, with Qt 4.4.2 on Gentoo.

The following backtrace is produced:

Application: Konqueror (konqueror), signal SIGSEGV
[Current thread is 0 (LWP 16000)]

Thread 2 (Thread 0xb14ebb90 (LWP 16023)):
#0  0xb7fdc424 in __kernel_vsyscall ()
#1  0xb728cfb2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb73066cc in QWaitCondition::wait () from /usr/lib/qt4/libQtCore.so.4
#3  0xb72fcbd6 in ?? () from /usr/lib/qt4/libQtCore.so.4
#4  0x0997d150 in ?? ()
#5  0x0997d14c in ?? ()
#6  0x00007530 in ?? ()
#7  0xb73d6330 in QAbstractEventDispatcher::QAbstractEventDispatcher () from /usr/lib/qt4/libQtCore.so.4
#8  0xb7305960 in ?? () from /usr/lib/qt4/libQtCore.so.4
#9  0x0a4e87e0 in ?? ()
#10 0x00000000 in ?? ()

Thread 1 (Thread 0xb627c700 (LWP 16000)):
#0  0xb7fdc424 in __kernel_vsyscall ()
#1  0xb6824916 in nanosleep () from /lib/libc.so.6
#2  0xb682472f in sleep () from /lib/libc.so.6
#3  0xb7967ca8 in ?? () from /usr/kde/4.2/lib/libkdeui.so.5
#4  0x00000000 in ?? ()
Comment 6 Dario Andres 2009-04-01 23:50:20 UTC
@Marcus Harrison: your crash may be different. If you can reproduce the crash at will, may you read http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports and post a complete backtrace in a NEW report? Thanks :)
Comment 7 Marcus Harrison 2009-04-02 15:59:07 UTC
Gah! Results vary. Now, it doesn't start, crashing silently instead. I'll post that in a new bug report here: https://bugs.kde.org/show_bug.cgi?id=188664
Comment 8 Aaron J. Seigo 2009-04-25 02:48:54 UTC
*** Bug 178765 has been marked as a duplicate of this bug. ***
Comment 9 esigra 2009-11-20 15:32:32 UTC
Created attachment 38459 [details]
konqueror.rc that makes Konqueror crash at startup

With this konqueror.rc I get a backtrace very similar to the one in bug #178765 when I start Konqueror 4.3.1 (Gentoo package).
Comment 10 esigra 2009-11-20 22:38:01 UTC
I upgraded to 4.3.3 but it still crashes:
Application: Konqueror (konqueror), signal: Aborted
[KCrash Handler]
#6  0xb8086424 in __kernel_vsyscall ()
#7  0xb625b88f in raise () from /lib/libc.so.6
#8  0xb6393ff4 in ?? () from /lib/libc.so.6
#9  0xbf946ff0 in ?? ()
#10 0xb625d3db in abort () from /lib/libc.so.6
#11 0xb710c4eb in qt_message_output (msgType=QtFatalMsg, buf=0x8484ed8 "ASSERT: \"id\" in file kernel/qwidget_x11.cpp, line 803") at global/qglobal.cpp:2042
#12 0xb710c5ba in qFatal (msg=0xb72a9040 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2241
#13 0xb710c7f5 in qt_assert (assertion=0xb6f00207 "id", file=0xb6efc172 "kernel/qwidget_x11.cpp", line=803) at global/qglobal.cpp:1811
#14 0xb68470e9 in QWidgetPrivate::create_sys (this=0x8373890, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget_x11.cpp:803
#15 0xb6806c8f in QWidget::create (this=0x8295898, window=0, initializeWindow=<value optimized out>, destroyOldWindow=<value optimized out>) at kernel/qwidget.cpp:1253
#16 0xb6803b86 in QWidgetPrivate::createWinId (this=0x8373890, winid=0) at kernel/qwidget.cpp:2178
#17 0xb684367c in QWidgetPrivate::setParent_sys (this=0x8373890, parent=0x83e39b8, f={i = 134279168}) at kernel/qwidget_x11.cpp:1052
#18 0xb68088a1 in QWidget::setParent (this=0x8295898, parent=0x83e39b8, f={i = 134279168}) at kernel/qwidget.cpp:9220
#19 0xb6809123 in QWidget::setParent (this=0x0, parent=0x274f) at kernel/qwidget.cpp:9177
#20 0xb800a32b in KonqMainWindow (this=0x819e0a8, initialURL=@0xbf947798, xmluiFile=@0xbf9477b4)
    at /portage_tmpdir/portage/kde-base/konqueror-4.3.3/work/konqueror-4.3.3/konqueror/src/konqmainwindow.cpp:271
#21 0xb7fc545d in KonqMisc::createBrowserWindowFromProfile (_path=@0xbf947a54, filename=@0xbf947a10, url=@0xbf9479d0, args=@0xbf947a50, browserArgs=@0xbf9478a0, forbidUseHTML=false, 
    filesToSelect=@0xbf947a4c, tempFile=false, openUrl=true) at /portage_tmpdir/portage/kde-base/konqueror-4.3.3/work/konqueror-4.3.3/konqueror/src/konqmisc.cpp:150
#22 0xb803dac5 in kdemain (argc=1, argv=0xbf947cc4) at /portage_tmpdir/portage/kde-base/konqueror-4.3.3/work/konqueror-4.3.3/konqueror/src/konqmain.cpp:205
#23 0x0804884b in main (argc=1, argv=0xbf947cc4) at /portage_tmpdir/portage/kde-base/konqueror-4.3.3/work/konqueror-4.3.3_build/konqueror/src/konqueror_dummy.cpp:3
Comment 11 Erik Boritsch 2011-01-29 21:32:43 UTC
Konqueror of KDE SC 4.6.0 still has issues managing the toolbars.
Comment 12 Dawit Alemayehu 2012-01-10 00:01:53 UTC
Git commit b21b16103a643d0a1b4cd3c9711774d8908d240c by Dawit Alemayehu.
Committed on 09/01/2012 at 08:59.
Pushed by adawit into branch 'KDE/4.8'.

Make sure Konqueror won't crash even when the locationbar and
hence the input combox is removed.
FIXED-IN: 4.8.1
REVIEW: 103663

M  +23   -16   konqueror/src/konqmainwindow.cpp

http://commits.kde.org/kde-baseapps/b21b16103a643d0a1b4cd3c9711774d8908d240c
Comment 13 Dawit Alemayehu 2012-01-10 00:03:03 UTC
Git commit 261ffb5ed440d98982c0ce99c91c9407bf110ce7 by Dawit Alemayehu.
Committed on 09/01/2012 at 08:59.
Pushed by adawit into branch 'master'.

Make sure Konqueror won't crash even when the locationbar and
hence the input combox is removed.
FIXED-IN: 4.8.1
REVIEW: 103663
(cherry picked from commit b21b16103a643d0a1b4cd3c9711774d8908d240c)

M  +23   -16   konqueror/src/konqmainwindow.cpp

http://commits.kde.org/kde-baseapps/261ffb5ed440d98982c0ce99c91c9407bf110ce7