Summary: | Plasma crashed while closing konqueor window (null KDirLister::directories, KFilePreviewGenerator::Private::updateCutItems) | ||
---|---|---|---|
Product: | [Applications] kfile | Reporter: | Unknown <null> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | 2manysheep, ahepas1999, alan.christopher.jenkins, amrecio, andresbajotierra, andrew.dorrell, armadillo13843, aseigo, bughunt, bugs.crash, bugs, caionnew, code933k, dazjorz, doyinosin, e0026053, faure, fergal.mullally, floreani89, g111, generesnik, gianted, giuseppefontana, gokcen.eraslan, gustavo321, hmohan, hpeat, jackiemcghee, jospoortvliet, justin, jvoss, kagaroth26, kdelibs-bugs, kimera.4, kpet, lists, luis4070, m2k.networx, magnus.bergmark, mail, manoharviswanatha, mantah, milimetr88, neerdowell, nwe2023, ochab, ojrajala, pascal, pascalbig, pedrogonzalezj, peter.penz19, peter, petrusbarbygere, Pogo_Dick, semox, siva.devel, slashdevdsp, solerman, supporto.gscomputer, thegoddemon, thilo.frueh, Vittorio.Vallero, wdmlist, xwillex, xxtjaxx, zaiboot |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.5.2 | |
Attachments: |
New crash information added by DrKonqi
patch that should help to figure out what goes wrong backtrace that happens with patch from Comment #41 patch for kfile/kfilepreviewgenerator.cpp that should solve the problem New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Unknown
2009-06-15 23:17:38 UTC
From "KFilePreviewGenerator::Private::updateCutItems": " KDirLister* dirLister = m_dirModel->dirLister(); const KUrl::List dirs = dirLister->directories(); " Crash *** Bug 197304 has been marked as a duplicate of this bug. *** *** Bug 198449 has been marked as a duplicate of this bug. *** *** Bug 200222 has been marked as a duplicate of this bug. *** *** Bug 203340 has been marked as a duplicate of this bug. *** *** Bug 198896 has been marked as a duplicate of this bug. *** *** Bug 204786 has been marked as a duplicate of this bug. *** *** Bug 205034 has been marked as a duplicate of this bug. *** *** Bug 205096 has been marked as a duplicate of this bug. *** *** Bug 205965 has been marked as a duplicate of this bug. *** *** Bug 206118 has been marked as a duplicate of this bug. *** *** Bug 207411 has been marked as a duplicate of this bug. *** *** Bug 207895 has been marked as a duplicate of this bug. *** *** Bug 209407 has been marked as a duplicate of this bug. *** *** Bug 211102 has been marked as a duplicate of this bug. *** *** Bug 212423 has been marked as a duplicate of this bug. *** *** Bug 213357 has been marked as a duplicate of this bug. *** *** Bug 213391 has been marked as a duplicate of this bug. *** *** Bug 213632 has been marked as a duplicate of this bug. *** *** Bug 213999 has been marked as a duplicate of this bug. *** *** Bug 214066 has been marked as a duplicate of this bug. *** *** Bug 214319 has been marked as a duplicate of this bug. *** *** Bug 216965 has been marked as a duplicate of this bug. *** *** Bug 218605 has been marked as a duplicate of this bug. *** *** Bug 218893 has been marked as a duplicate of this bug. *** *** Bug 219936 has been marked as a duplicate of this bug. *** *** Bug 220742 has been marked as a duplicate of this bug. *** *** Bug 221130 has been marked as a duplicate of this bug. *** *** Bug 221060 has been marked as a duplicate of this bug. *** *** Bug 223637 has been marked as a duplicate of this bug. *** *** Bug 225464 has been marked as a duplicate of this bug. *** *** Bug 228566 has been marked as a duplicate of this bug. *** So far, nobody experienced this crash on KDE SC 4.3.86+; we could wait a bit more and consider this fixed. (if no new cases appear) Actually, bug 221060 was on KDE 4.3.86 With my "4.3.86+" I wanted to mean ">4.3.86", sorry about the confusion. I used to experience this bug quite frequently, and it has completely vanished for me since KDE SC 4.4.0. Assume it is fixed since KDE SC 4.4.0. *** Bug 229196 has been marked as a duplicate of this bug. *** Created attachment 41505 [details]
New crash information added by DrKonqi
I've got this error on KDE SC 4.4.1. I think it's the same bug but a developer should have a look. At least, I can read the same methods mentioned in the bug report on my stack trace.
Reopen cause of comment #39 which has the backtrace on KDE 4.4.1 with Qt 4.6.2 Created attachment 41527 [details]
patch that should help to figure out what goes wrong
This patch does introduce a Q_ASSERT that should assert if the KDirModel gets destroyed while the KFilePreviewGenerator is still alive and still holds a pointer to the KDirModel (which is not set to NULL what would result in a dangling pointer what would explain the crash).
The patch can be applied with
cd /path/to/sourcecode/KDE/kdelibs && patch -p0 < ug196681.patch && cd /path/to/builddir/KDE/kdelibs/kfile && make install
If the assert shows up Dr. Konqi allows to generate a backtrace. That backtrace would then show who deletes the KDirModel what we could fix then.
this is a bug in kfile, let's put it there. personally, i'd suggest a QWeakPointer around the m_dirModel and checking it before use in all cases. m_dirModel can also be NULL on line 441, yet the connection: QClipboard* clipboard = QApplication::clipboard(); connect(clipboard, SIGNAL(dataChanged()), q, SLOT(updateCutItems())); is made regardless of this, and updateCutItems expects m_dirModel to be valid. that connection should perhaps be only made when m_dirModel. i'm CC'ing David as this is much more his sort of territory of expertise than mine :) This is actually Peter's code :-) *** Bug 231046 has been marked as a duplicate of this bug. *** *** Bug 231194 has been marked as a duplicate of this bug. *** Created attachment 41811 [details] backtrace that happens with patch from Comment #41 Created attachment 41812 [details]
patch for kfile/kfilepreviewgenerator.cpp that should solve the problem
*** Bug 231830 has been marked as a duplicate of this bug. *** So, did anyone run this in valgrind to find out why/where the dirmodel was being deleted? It sounds very wrong to me that the KFilePreviewGenerator would outlive the dirmodel, and the suggested fix is just a workaround IMHO. Sorry for the late reply, I was not aware that there are so many duplicates for this issue. I agree with David that the suggested fix seems to be only a workaround, the model may not get deleted during the KFilePreviewGenerator (~controller/view) is still working on it. I've reassigned this issue to me. I hope I've time during the next week for having a look on it. If anybody in the meantime has found out, who deletes the model, then of course this would be very welcome :-) *** Bug 231984 has been marked as a duplicate of this bug. *** *** Bug 232719 has been marked as a duplicate of this bug. *** *** Bug 233748 has been marked as a duplicate of this bug. *** *** Bug 234094 has been marked as a duplicate of this bug. *** *** Bug 234317 has been marked as a duplicate of this bug. *** *** Bug 234640 has been marked as a duplicate of this bug. *** *** Bug 234708 has been marked as a duplicate of this bug. *** *** Bug 234699 has been marked as a duplicate of this bug. *** Created attachment 43020 [details]
New crash information added by DrKonqi
There is no obvious reason but -perhaps- intensive memory use as I have Konqueror with more than 20 tabs, talking via Skype + Kopete with Amarok and Kontact in background...
I wasn't doing anything in particular when the crash happened.
*** Bug 236939 has been marked as a duplicate of this bug. *** *** Bug 236831 has been marked as a duplicate of this bug. *** *** Bug 240199 has been marked as a duplicate of this bug. *** @Peter Penz: if this hasn't already been fixed in trunk, would you be alright with committing the workaround (though using a QWeakPointer rather than a QPointer :) at least for 4.5? getting rid of a crash, even if by work-around, is better than waiting on the right fix while shipping a known crasher again imho. *** Bug 241243 has been marked as a duplicate of this bug. *** *** Bug 242992 has been marked as a duplicate of this bug. *** *** Bug 244786 has been marked as a duplicate of this bug. *** *** Bug 245493 has been marked as a duplicate of this bug. *** *** Bug 246299 has been marked as a duplicate of this bug. *** Created attachment 50119 [details]
New crash information added by DrKonqi
plasma-desktop (0.3) on KDE Platform 4.5.00 (KDE 4.5.0) using Qt 4.7.0
- What I was doing when the application crashed:
I was browsing the internet with chromium.
- Unusual behavior I noticed:
Immediately before the plasma crash, I was notified by tray notifier that the indexing service (perhaps strigi) was temporary interrupted. unfortunately, some crash perhaps involve this notifier, because i can't see the related message within history.
-- Backtrace (Reduced):
#7 0xb726a1aa in KDirModel::dirLister (this=0x8462488) at ../../kio/kio/kdirmodel.cpp:358
#8 0xb3c2b776 in KFilePreviewGenerator::qt_metacall (this=0x9b70c68, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbf8f2e6c) at ./kfilepreviewgenerator.moc:97
[...]
[...]
#11 0xb63a4c87 in QClipboard::dataChanged (this=0x8412128) at .moc/release-shared/moc_qclipboard.cpp:114
#12 0xb5cd5bf4 in QApplication::x11ProcessEvent (this=0x840ca08, event=0xbf8f323c) at kernel/qapplication_x11.cpp:3370
#13 0xb5d04b3a in x11EventSourceDispatch (s=0x841b0f0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
*** Bug 249042 has been marked as a duplicate of this bug. *** *** Bug 250334 has been marked as a duplicate of this bug. *** @Aaron (in reply to comment #63): Sorry for the late reply - yes, applying the workaround is OK for me. I'm currently on vacation and cannot apply the patch from Sebastian, it would be great if someone else can commit the patch (I hope I find the time to fix this in a cleaner way for 4.6...) Thanks! SVN commit 1176325 by ppenz: KDirModel takes ownership of the directory lister, so don't delete the directory lister manually. BUG: 196681 M +1 -2 dolphinpart.cpp M +1 -8 dolphinviewcontainer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176325 SVN commit 1176328 by ppenz: Applications may not delete the directory model before deleting the KFilePreviewGenerator instance. However it is very easy for applications to violate this, so instead of crashing provide a warning for the application developer. Thanks a lot to Sebastian Sauer for the investigations and the patch! CCBUG: 196681 M +7 -1 kfilepreviewgenerator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176328 SVN commit 1176329 by ppenz: Backport of SVN commit 1176328: Applications may not delete the directory model before deleting the KFilePreviewGenerator instance. However it is very easy for applications to violate this, so instead of crashing provide a warning for the application developer. Thanks a lot to Sebastian Sauer for the investigations and the patch! CCBUG: 196681 FIXED-IN: 4.5.2 M +7 -1 kfilepreviewgenerator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176329 Great work, Peter and Sebastian! I hope that this one stays closed this time. *** Bug 251587 has been marked as a duplicate of this bug. *** *** Bug 253825 has been marked as a duplicate of this bug. *** *** Bug 254499 has been marked as a duplicate of this bug. *** *** Bug 256556 has been marked as a duplicate of this bug. *** *** Bug 256977 has been marked as a duplicate of this bug. *** *** Bug 257112 has been marked as a duplicate of this bug. *** *** Bug 257066 has been marked as a duplicate of this bug. *** *** Bug 259560 has been marked as a duplicate of this bug. *** *** Bug 261338 has been marked as a duplicate of this bug. *** *** Bug 261822 has been marked as a duplicate of this bug. *** *** Bug 262534 has been marked as a duplicate of this bug. *** *** Bug 264137 has been marked as a duplicate of this bug. *** *** Bug 265146 has been marked as a duplicate of this bug. *** *** Bug 268769 has been marked as a duplicate of this bug. *** |