Summary: | Dolphin segfaults on renaming files since commit 6a49661202855aebfb2431ede8abe4f9fc053fa6 | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Hrvoje Senjan <hrvoje.senjan> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | adaptee |
Priority: | NOR | Keywords: | regression, release_blocker, reproducible |
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/de51a75fc0dcbb10fa7bfc64e1fab3f2e74a1f85 | Version Fixed In: |
Description
Hrvoje Senjan
2013-06-06 01:13:30 UTC
Wrong component i guess. Also, i should mention that i tried turning off/on previews, natural sorting, etc, also segfaults. I can reproduce it, too. "git bisect" shows it is introduced by commit 6a49661202855aebfb2431ede8abe4f9fc053fa6 commit 6a49661202855aebfb2431ede8abe4f9fc053fa6 Author: Frank Reininghaus <frank78ac@googlemail.com> Date: 4 hours ago KFileItemModelRolesUpdater: waste less ressources and fix some bugs Thanks for the bug report and sorry for the stupid regression. It seems that one of the last things that I changed before pushing the commit broke it. Unfortunately, I can't reproduce the crash here at the moment though - I tried both inline/non-inline renaming, with/without previews. It might be timing-dependent, i.e., it could be that it only happens if done during a particular phase of the preview/icon loading process. The backtrace provides some hints about what's going wrong - the same function (KFileItemModelRolesUpdater::updateChangedItems) calls itself (with a few frames in between), this looks like it could easily mess things up. I still don't know how this happens, and I would appreciate any hints that help me reproduce the bug and do some further analysis, but I think we can at least work around the problem by replacing one of the function calls in between by a delayed meata method invocation. However, this will only change things if previews are enabled. You say that it happens with previews disabled as well, right? Could you please also provide a backtrace for that? It should look different. Thanks again for your help. Git commit 0c3305c8d03532884a66f4b883925d0e7086f681 by Frank Reininghaus. Committed on 06/06/2013 at 08:38. Pushed by freininghaus into branch 'master'. startPreviewJob: if items is empty, delay call to slotPreviewJobFinshed This should prevent that other functions, which start preview jobs, eventually call themselves and thus cause trouble. M +1 -1 dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp http://commits.kde.org/kde-baseapps/0c3305c8d03532884a66f4b883925d0e7086f681 Git commit 2226adad4afc26de1975c0c6f75527728ee3b7e0 by Frank Reininghaus. Committed on 06/06/2013 at 08:49. Pushed by freininghaus into branch 'master'. Make calls to resolveNextPendingRoles and resolveNextSortRole delayed This prevents that functions that call these indirectly call themselves recursively and cause trouble. M +4 -4 dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp http://commits.kde.org/kde-baseapps/2226adad4afc26de1975c0c6f75527728ee3b7e0 I did manage to reproduce it in the mean time - it turns out that I did my recent testing with "Sort by Type" enabled, which works around the problem. The problem was - also with previews disabled - that updateChangedItems() called itself indirectly, and this caused an infinite recursion. Making the call asynchronous fixes this, so there are no crashes any more. But I'll look at this again in detail and check if this recursive calling is caused by some logic error in the code. Thanks again for your help, Hrvoje and Jekyll! Early testing of recent changes in master is greatly appreciated :-) The benefits of your work for the quality of the code that we'll ship in the betas, and later on, in stable versions, cannot be overestimated! Git commit de51a75fc0dcbb10fa7bfc64e1fab3f2e74a1f85 by Frank Reininghaus. Committed on 06/06/2013 at 10:00. Pushed by freininghaus into branch 'master'. Ignore a changed item if it cannot be found in the model This prevents repeated attempts to reload the data for the non-existing item. This was the root cause of bug 320791. Thanks to Hrvoje Senjan and Jekyll Wu for testing the new code and finding this bug! M +1 -0 dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp http://commits.kde.org/kde-baseapps/de51a75fc0dcbb10fa7bfc64e1fab3f2e74a1f85 (In reply to comment #6) > I did manage to reproduce it in the mean time - it turns out that I did my > recent testing with "Sort by Type" enabled, which works around the problem. Hm, i haven't tried that originally, but tested few mins ago, and can confirm it doesn't segfault with Sort by Type :-) > The problem was - also with previews disabled - that updateChangedItems() > called itself indirectly, and this caused an infinite recursion. Making the > call asynchronous fixes this, so there are no crashes any more. But I'll > look at this again in detail and check if this recursive calling is caused > by some logic error in the code. I can confirm no segfaults now, with the latest commits, thanks for fixing this fast! > Thanks again for your help, Hrvoje and Jekyll! Early testing of recent > changes in master is greatly appreciated :-) The benefits of your work for > the quality of the code that we'll ship in the betas, and later on, in > stable versions, cannot be overestimated! No problem :-) Thank you for awesome work on dolphin! :-) |