Bug 195726 - konqueror crashes on initial run as fresh kde4 user in kde3 session
Summary: konqueror crashes on initial run as fresh kde4 user in kde3 session
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: ksycoca (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 205054 238439 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-09 00:41 UTC by Christoph Feck
Modified: 2011-06-17 15:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Konsole output from the crash (191.56 KB, text/plain)
2009-08-20 22:34 UTC, Christoph Feck
Details
Backtrace of the crash (2.82 KB, text/plain)
2009-08-20 22:36 UTC, Christoph Feck
Details
longer dbus timeout (614 bytes, patch)
2009-08-21 16:29 UTC, David Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2009-06-09 00:41:58 UTC
Application that crashed: konqueror
Version of the application: 4.2.90 (KDE 4.2.90 (KDE 4.3 Beta2))
KDE Version: 4.2.90 (KDE 4.2.90 (KDE 4.3 Beta2))
Qt Version: 4.6.0
Operating System: Linux 2.6.27.21-0.1-default i686

What I was doing when the application crashed:
On a fresh user (rm -rf /home/user/.kde /tmp/kde-user /tmp/ksocket-user /var/tmp/kdecache-user) I started "konqueror" in konsole from kde3 session (after su - user)


 -- Backtrace:
Application: Konqueror (konqueror), signal: Aborted
[KCrash Handler]
#6  0xffffe430 in __kernel_vsyscall ()
#7  0xb631d990 in raise () from /lib/libc.so.6
#8  0xb631f2c8 in abort () from /lib/libc.so.6
#9  0xb716b574 in qt_message_output (msgType=QtFatalMsg, buf=0x81554c0 "ASSERT: \"str\" in file /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypefactory.cpp, line 36")
    at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:2017
#10 0xb716b65e in qFatal (msg=0xb72c7a1c "ASSERT: \"%s\" in file %s, line %d") at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:2216
#11 0xb716b755 in qt_assert (assertion=0xb75e7a0a "str", file=0xb75c82a8 "/local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypefactory.cpp", line=36)
    at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:1786
#12 0xb75085d1 in KServiceTypeFactory (this=0x814b028) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypefactory.cpp:36
#13 0xb750947a in KSycocaFactorySingleton<KServiceTypeFactory>::self (this=0x814b018) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/sycoca/ksycocafactory.h:200
#14 0xb75086c8 in KServiceTypeFactory::self () at /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypefactory.cpp:65
#15 0xb7509603 in KServiceTypeProfiles::ensureParsed (this=0x814afa0) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypeprofile.cpp:71
#16 0xb7509ae8 in operator-> (this=0xb7652789) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypeprofile.cpp:60
#17 0xb750a300 in KServiceTypeProfile::hasProfile (serviceType=...) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypeprofile.cpp:172
#18 0xb750c38f in KServiceTypeTrader::query (this=0x814af90, serviceType=..., constraint=...) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/services/kservicetypetrader.cpp:137
#19 0xb7fca9c4 in ToggleViewGUIClient (this=0x8149c28, mainWindow=0x814eba0) at /local/svn/kde/trunk/KDE/kdebase/apps/konqueror/src/konqguiclients.cpp:109
#20 0xb802a95b in KonqMainWindow (this=0x814eba0, initialURL=..., xmluiFile=..., __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>)
    at /local/svn/kde/trunk/KDE/kdebase/apps/konqueror/src/konqmainwindow.cpp:221
#21 0xb7fe7e2a in KonqMisc::createBrowserWindowFromProfile (_path=..., filename=..., url=..., args=..., browserArgs=..., forbidUseHTML=false, filesToSelect=..., tempFile=false, openUrl=true)
    at /local/svn/kde/trunk/KDE/kdebase/apps/konqueror/src/konqmisc.cpp:150
#22 0xb805e842 in kdemain (argc=1, argv=0xbfcc3a84) at /local/svn/kde/trunk/KDE/kdebase/apps/konqueror/src/konqmain.cpp:205
#23 0x0804878b in main (argc=1, argv=0xbfcc3a84) at /local/build/KDE/kdebase/apps/konqueror/src/konqueror_dummy.cpp:3

Reported using DrKonqi
Comment 1 FiNeX 2009-08-20 22:15:32 UTC
I'm not able to reproduce because I've only KDE 4 on my system. Anyway it looks like you've started konqueror 4 from the shell session. What is the output of 

  konqueror --version

?
Comment 2 FiNeX 2009-08-20 22:16:10 UTC
P.S: Are you able to reproduce every time?
Comment 3 Christoph Feck 2009-08-20 22:33:12 UTC
Leonardo, thanks for looking into the problem. After some more tests, the problem is not really with Konqueror, but the crash occurs with any application started from a clean KDE. This bug should probably moved to kdecore.

My main desktop is KDE3, and I have a separate "kde4" user account for testing. Insider Konsole3, I use "su - kde4" to log in as the kde4 user. Then I use the following commands to get rid of any stuff to simulate a clean KDE4:

kill-kde4-binaries.sh
rm -rf /home/kde4/.kde /var/tmp/kdecache-kde4 /tmp/kde-kde4 /tmp/ksocket-kde4 /home/kde4/.config /home/kde4/.local

(The first command is only required when a previous attempt to run KDE4 programs was made; ask David Faure for the script.)

Then running any KDE4 program results in the crash above. The crash happens delayed, probably after DBus decides to timeout.

I will attach the Konsole output, as well as the crash that goes with it.
Comment 4 Christoph Feck 2009-08-20 22:34:18 UTC
Created attachment 36311 [details]
Konsole output from the crash
Comment 5 Christoph Feck 2009-08-20 22:36:43 UTC
Created attachment 36312 [details]
Backtrace of the crash
Comment 6 David Faure 2009-08-21 16:28:23 UTC
Reproduced. The dbus call in ktoolinvocation (when kded calls kbuildsycoca4) times out (and then konqueror resumes too early, before ksycoca4 is ready).

I see some solutions:
- longer dbus timeout in ktoolinvocation
- using qprocess in kded instead of ktoolinvocation (small performance hit)
- launching async and waiting for the dbus signal when it's done (but what if it is never emitted...) (and a nested event loop sounds bad)
Comment 7 David Faure 2009-08-21 16:29:49 UTC
Created attachment 36330 [details]
longer dbus timeout
Comment 8 Christoph Feck 2009-08-25 13:49:13 UTC
David, thanks, but comment #7 did not help.
Comment 9 Christoph Feck 2009-08-25 13:49:57 UTC
*** Bug 205054 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2010-05-27 12:13:59 UTC
*** Bug 238439 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2011-06-17 15:30:42 UTC
Fixed by David Faure.

http://commits.kde.org/kdelibs/53173d0fbb19d9d812b24291f257a04a7d099edb