Bug 169103 - Dolphin crashes at startup: ASSERT: "(*it).isValid()" in file previewjob.cpp
Summary: Dolphin crashes at startup: ASSERT: "(*it).isValid()" in file previewjob.cpp
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 168008 169923 171610 172161 172723 173190 174870 175865 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-14 09:38 UTC by Carsten Schlipf
Modified: 2008-12-05 14:41 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
dolphinrc file that causes the crash (1.46 KB, text/plain)
2008-08-15 16:56 UTC, Carsten Schlipf
Details
A dolfinrc causing my dolphin to crash (1.08 KB, application/octet-stream)
2008-08-27 13:01 UTC, Johan Hake
Details
Patch to fix the problem (629 bytes, patch)
2008-10-14 23:29 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Schlipf 2008-08-14 09:38:27 UTC
Version:            (using KDE 4.1.0)
Installed from:    Ubuntu Packages
Compiler:          gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
 
OS:                Linux

Since upgrading from KDE 4.1 Beta 2 to KDE 4.1 final dolphin is crashing when I try to start it. This is the output I get:

ASSERT: "(*it).isValid()" in file /build/buildd/kde4libs-4.1.0/kio/kio/previewjob.cpp, line 565
<unknown program name>(13556)/: Communication problem with  "dolphin" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" "


I tried to remove ~/.kde4/share/apps/dolphin* but didn't help.
Comment 1 Dario Andres 2008-08-14 17:02:42 UTC
This may be related/duplicate of bug 168008
Comment 2 Carsten Schlipf 2008-08-15 10:20:46 UTC
I created a new user and started dolphin as that user. This time it worked. So it seems to be related to some configuration files in my ~/.kde4 directory.
Comment 3 Peter Penz 2008-08-15 14:02:55 UTC
Thanks Carsten for the update. I could not reproduce this issue here, hopefully it really was just a problem due to an old installation... Is it OK to set this issue to WORKSFORME? There are so many open issues that I must take care closing all the issues which are not reproducible ASAP. Otherwise please just reopen this issue again and I'll have to reassign this to kdelibs...
Comment 4 Carsten Schlipf 2008-08-15 16:50:45 UTC
Hi Peter,

on my real user account it still does not work. But I see your point.

When I have some time I will try to pin down the configuration file that causes the problem and possibily attach this file so that you may be able to reproduce this.  Then I will reopen it.

Until then I leave it as RESOLVED WORKSFORME - at least there is one workaround available.

Thank you very much for your great work!
Comment 5 Carsten Schlipf 2008-08-15 16:56:16 UTC
Created attachment 26863 [details]
dolphinrc file that causes the crash

When this file was stored as ~/.kde4/share/config/dolphinrc, dolphin crashed at
startup
Comment 6 Carsten Schlipf 2008-08-15 16:58:27 UTC
OK... just remembered that there are additional configuration files in ~/.kde4/share/config and the old dolphinrc file was indeed the cause for this crash.

Please find the file attached in comment #5.

I am reopening this bug report therefore.
Comment 7 Peter Penz 2008-08-15 17:40:10 UTC
Thanks Carsten, the dolphinrc that causes the crash is very useful. I've added this to my TODO-list...
Comment 8 Johan Hake 2008-08-27 13:01:42 UTC
Created attachment 27083 [details]
A dolfinrc causing my dolphin to crash
Comment 9 Johan Hake 2008-08-27 13:08:07 UTC
I can confirm this bug. The part of my dolphinrc file that is similare to Carstens file is the topmost part, which is not included in a section header. That to say:

  ----------------------------
  Height 1200=663
  State= (Truncated long line)
  Width 1600=1010 
  ----------------------------

When I removed this part from my dolphinrc file it worked again.

I have also added my dolfinrc file below.

Johan
Comment 10 Pino Toscano 2008-09-01 11:04:46 UTC
*** Bug 168008 has been marked as a duplicate of this bug. ***
Comment 11 Frank Reininghaus 2008-09-16 20:11:26 UTC
*** Bug 169923 has been marked as a duplicate of this bug. ***
Comment 12 Frank Reininghaus 2008-09-16 20:12:51 UTC
Note that the duplicate bug 169923 gives instructions how to get the configuration into the broken state:

"When you move both panels out of the main window, quit dolphin and then re-open it, you get a crash."
Comment 13 Frank Reininghaus 2008-10-05 02:33:32 UTC
*** Bug 172161 has been marked as a duplicate of this bug. ***
Comment 14 Frank Reininghaus 2008-10-13 22:23:37 UTC
*** Bug 172723 has been marked as a duplicate of this bug. ***
Comment 15 Frank Reininghaus 2008-10-14 23:29:30 UTC
Created attachment 27886 [details]
Patch to fix the problem

I've looked a bit into this. The problem appears to be in DolphinMainWindow::init(): This function calls setupGUI() before the signal urlChanged(homeUrl) is emitted, and in the case that the Information Panel is detached from the main window, this means that InfoSidebarPage::showItemInfo() is called before its URL is set. That function calls KIO::filePreview() which checks if the URL it gets is valid with an assert.

Moving "emit urlChanged(homeUrl);" from the end of DolphinMainWindow::init() solves the problem for me. It must be called after setupDockWidgets() because the signals and slots get connected there, but before setupGUI() in order to prevent the crash. I can't see any bad side effects of this, but I'm not really familiar with the code ;-)

I've verified that I get no crashes with the dolphinrc attached to this report and the one from the dup 172723 (Dolphin indeed opens with a detached Information panel with these).
Comment 16 Frank Reininghaus 2008-10-14 23:32:42 UTC
*** Bug 171610 has been marked as a duplicate of this bug. ***
Comment 17 Peter Penz 2008-10-15 08:03:46 UTC
SVN commit 871525 by ppenz:

Assure that the docks get informed about an URL change before the GUI is setup (thanks to Frank Reininghaus for the patch!). This prevents that slots from the docks are called with invalid URLs.

BUG: 169103
CCMAIL: frankreininghaus@web.de>

 M  +1 -1      dolphinmainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=871525
Comment 18 Peter Penz 2008-10-15 08:09:10 UTC
SVN commit 871529 by ppenz:

Backport of SVN commit 71525:

Assure that the docks get informed about an URL change before the GUI is setup
(thanks to Frank Reininghaus for the patch!). This prevents that slots from the
docks are called with invalid URLs.

CCBUG: 169103
CCMAIL: frankreininghaus@web.de

 M  +2 -3      dolphinmainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=871529
Comment 19 Frank Reininghaus 2008-10-21 23:56:46 UTC
*** Bug 173190 has been marked as a duplicate of this bug. ***
Comment 20 Pedro Morgan 2008-11-11 18:01:02 UTC
Thanks to comment #6
deleting the
~/.kde4/share/config/dolphinrc file
solved the problem
Comment 21 Frank Reininghaus 2008-11-11 19:35:16 UTC
*** Bug 174870 has been marked as a duplicate of this bug. ***
Comment 22 Peter Penz 2008-12-05 14:41:58 UTC
*** Bug 175865 has been marked as a duplicate of this bug. ***