Bug 246747 - Crash when opening folder in new tab
Summary: Crash when opening folder in new tab
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: reproducible
: 246701 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-05 00:42 UTC by Christoph Feck
Modified: 2010-08-17 21:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2010-08-05 00:42:40 UTC
Application: dolphin (1.5)
KDE Platform Version: 4.5.61 (KDE 4.5.61 (KDE 4.6 >= 20100724)) (Compiled from sources)
Qt Version: 4.7.0
Operating System: Linux 2.6.34.1-0.1-desktop i686
Distribution: "openSUSE 11.3 (i586)"

-- Information about the crash:
- What I was doing when the application crashed:
* Start Dolphin
* Choose "Open in New Tab" in the context menu of a folder
-> this crash

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (kdeinit4), signal: Aborted
[Current thread is 1 (Thread 0xb5791710 (LWP 9924))]

Thread 2 (Thread 0xb01e4b70 (LWP 9947)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5dc20b1 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb6dc1737 in QProcessManager::run (this=0xb6f698ac) at /local/git/Qt/qt/src/corelib/io/qprocess_unix.cpp:245
#3  0xb6cdcc7e in QThreadPrivate::start (arg=0xb6f698ac) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:274
#4  0xb6c56b25 in start_thread (arg=0xb01e4b70) at pthread_create.c:297
#5  0xb5dc946e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb5791710 (LWP 9924)):
[KCrash Handler]
#7  0xffffe424 in __kernel_vsyscall ()
#8  0xb5d217ff in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#9  0xb5d23140 in abort () at abort.c:92
#10 0xb6cd274b in qt_message_output (msgType=QtFatalMsg, buf=
    0x83119b0 "ASSERT: \"m_view->isActive() == m_urlNavigator->isActive()\" in file /local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp, line 219")
    at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:2259
#11 0xb6cd28b6 in qt_message (msgType=QtFatalMsg, msg=0xb6e5d674 "ASSERT: \"%s\" in file %s, line %d", ap=0xbf8975b4 "\320\f\263\262\204\f\263\262\333")
    at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:2305
#12 0xb6cd2ce2 in qFatal (msg=0xb6e5d674 "ASSERT: \"%s\" in file %s, line %d") at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:2488
#13 0xb6cd22f0 in qt_assert (assertion=0xb2b30cd0 "m_view->isActive() == m_urlNavigator->isActive()", file=0xb2b30c84 "/local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp", 
    line=219) at /local/git/Qt/qt/src/corelib/global/qglobal.cpp:2004
#14 0xb2af8717 in DolphinViewContainer::isActive (this=0x82236d8) at /local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:219
#15 0xb2af8eca in DolphinViewContainer::slotDirListerCompleted (this=0x82236d8) at /local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.cpp:361
#16 0xb2af9dcd in DolphinViewContainer::qt_metacall (this=0x82236d8, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbf8976ec) at /local/build/KDE/kdebase/apps/dolphin/src/dolphinviewcontainer.moc:128
#17 0xb6dee242 in QMetaObject::metacall (object=0x82236d8, cl=QMetaObject::InvokeMetaMethod, idx=35, argv=0xbf8976ec) at /local/git/Qt/qt/src/corelib/kernel/qmetaobject.cpp:237
#18 0xb6e01171 in QMetaObject::activate (sender=0x82fe988, m=0xb5628b3c, local_signal_index=1, argv=0x0) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:3272
#19 0xb54c4fa5 in KDirLister::completed (this=0x82fe988) at /local/build/KDE/kdelibs/kio/kdirlister.moc:213
#20 0xb54b6f4a in KDirListerCache::emitItemsFromCache (this=0x81d01a0, lister=0x82fe988, items=..., rootItem=..., _url=..., _reload=true, _emitCompleted=true)
    at /local/svn/kde/trunk/KDE/kdelibs/kio/kio/kdirlister.cpp:315
#21 0xb54b6ccc in KDirLister::Private::CachedItemsJob::done (this=0x830abe8) at /local/svn/kde/trunk/KDE/kdelibs/kio/kio/kdirlister.cpp:277
#22 0xb54c58f4 in KDirLister::Private::CachedItemsJob::qt_metacall (this=0x830abe8, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x830d220) at /local/build/KDE/kdelibs/kio/kdirlister_p.moc:169
#23 0xb6dee242 in QMetaObject::metacall (object=0x830abe8, cl=QMetaObject::InvokeMetaMethod, idx=26, argv=0x830d220) at /local/git/Qt/qt/src/corelib/kernel/qmetaobject.cpp:237
#24 0xb6dfc281 in QMetaCallEvent::placeMetaCall (this=0x830ace0, object=0x830abe8) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:534
#25 0xb6dfd305 in QObject::event (this=0x830abe8, e=0x830ace0) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:1211
#26 0xb6174494 in QApplicationPrivate::notify_helper (this=0x80b6818, receiver=0x830abe8, e=0x830ace0) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:4392
#27 0xb6171d40 in QApplication::notify (this=0xbf898154, receiver=0x830abe8, e=0x830ace0) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3794
#28 0xb7590d76 in KApplication::notify (this=0xbf898154, receiver=0x830abe8, event=0x830ace0) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:309
#29 0xb6de6baf in QCoreApplication::notifyInternal (this=0xbf898154, receiver=0x830abe8, event=0x830ace0) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:732
#30 0xb6dea49d in QCoreApplication::sendEvent (receiver=0x830abe8, event=0x830ace0) at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:215
#31 0xb6de7c48 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x805bd60) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1373
#32 0xb6de7905 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1266
#33 0xb6e1b80c in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:220
#34 0xb6e1a98a in postEventSourceDispatch (s=0x80b9fa0) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#35 0xb5965b49 in g_main_dispatch (context=0x80b8cf0) at gmain.c:1960
#36 IA__g_main_context_dispatch (context=0x80b8cf0) at gmain.c:2513
#37 0xb5966350 in g_main_context_iterate (context=0x80b8cf0, block=1, dispatch=1, self=0x80b7508) at gmain.c:2591
#38 0xb596660e in IA__g_main_context_iteration (context=0x80b8cf0, may_block=1) at gmain.c:2654
#39 0xb6e1b134 in QEventDispatcherGlib::processEvents (this=0x80b6d90, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:415
#40 0xb623aac8 in QGuiEventDispatcherGlib::processEvents (this=0x80b6d90, flags=...) at /local/git/Qt/qt/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#41 0xb6de490d in QEventLoop::processEvents (this=0xbf8980dc, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#42 0xb6de4a51 in QEventLoop::exec (this=0xbf8980dc, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#43 0xb6de729a in QCoreApplication::exec () at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1009
#44 0xb6171972 in QApplication::exec () at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3668
#45 0xb2afe314 in kdemain (argc=5, argv=0x809ca98) at /local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/main.cpp:98
#46 0x0804dd65 in launch (argc=5, _name=0x809c23c "/local/kde4/bin/dolphin", args=0x809c27f "\001", cwd=0x0, envc=1, envs=0x809c290 "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=
    0x809c294 "duo;1280961529;990111;4478_TIME23906439") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:727
#47 0x0804edfa in handle_launcher_request (sock=8, who=0x8053278 "launcher") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1219
#48 0x0804f53b in handle_requests (waitForPid=0) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1412
#49 0x08050e35 in main (argc=4, argv=0xbf8988e4, envp=0xbf8988f8) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1898

This bug may be a duplicate of or related to bug 196746.

Possible duplicates by query: bug 196746.

Reported using DrKonqi
Comment 1 Frank Reininghaus 2010-08-08 19:44:56 UTC
Hm, reminds me a bit of bug 180494 - the "active" state of the URL navigator and the view is not equal.

It's strange that the crash does not happen when you just open a new tab (e.g., via Ctrl-T). I'll try to have a look.
Comment 2 Frank Reininghaus 2010-08-08 20:11:30 UTC
I think that bug 246701 is due to the same bug in the code: If asserts are disabled, there's no crash, but the new tab does not show the contents of the clicked folder, but the home folder. The tab title shows the clicked folder though.
Comment 3 Peter Penz 2010-08-08 22:04:46 UTC
*** Bug 246701 has been marked as a duplicate of this bug. ***
Comment 4 Frank Reininghaus 2010-08-08 22:11:11 UTC
The bug is due to the call

setSearchModeEnabled(isSearchUrl(url));

in the DolphinViewContainer constructor. After that call, the URL of the view and the URL navigator are set to the home URL.

Commenting out that line fixes the crash and the "wrong folder shown" issue for me.
Comment 5 Peter Penz 2010-08-08 22:22:10 UTC
Thanks Frank for investigating into the root cause! I'll have a look on this during this week...
Comment 6 Frank Reininghaus 2010-08-08 23:04:25 UTC
I think the problem in DolphinViewContainer::setSearchModeEnabled(bool enabled) is that

m_urlNavigator->goHome()

is called if

m_searchBox->setSearchPath(url)

yields an invalid URL. This is the case here because the search mode was never enabled. That case should somehow be considered, but I'll leave that up to you - I'm not really familiar with the search stuff ;-)

The cause of the crash seems to be:

1. In DolphinMainWindow::openNewTab(const KUrl& url), the line "viewTab.primaryView->setActive(false);" deactivates both the navigator and the view.

2. After that, the view (but not the navigator) gets activated by DolphinViewContainer::requestFocus(), which gets invoked by a timer from DolphinViewContainer::slotUrlNavigatorLocationChanged.

3. The view is active now, but the navigator not -> assert.

The reason why that happens only in the "open this folder in a new tab" case and not if the current tab is duplicated via Ctrl-T is probably that the new tab is focused in the latter case, but not in the former.

I'm not sure if this second issue which leads to the crash might be worth a fix of it's own - maybe it could lead to similar crashes in the future.
Comment 7 Peter Penz 2010-08-17 21:54:39 UTC
SVN commit 1164862 by ppenz:

Fix triggering of an assertion, if a new tab is opened. Thanks to Frank Reininghaus for the detailed analyses!

BUG: 246747
FIXED-IN: 4.6.0



 M  +5 -3      dolphinviewcontainer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1164862