Summary: | Krita crashes sometimes when I save the work | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Eduardo Medina <edu.rm.85> |
Component: | kdecore | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | a4ahimsa, cfeck, edu.rm.85, gord.goodwin, griffinvalley, halla, inscription, janez.rupar, janowski.m, register, salamanderrake, takiro-kde, vuillemin.pierre.mobile, windoem |
Priority: | NOR | ||
Version: | 4.10.4 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdelibs/fa0be8a39623b3bc18454895b4008440f6e4ed0d | Version Fixed In: | 4.11.4 |
Sentry Crash Report: | |||
Attachments: |
The problematic Kra file
A new Kcrash file New crash information added by DrKonqi New crash information added by DrKonqi New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Eduardo Medina
2013-06-13 10:50:51 UTC
Created attachment 80499 [details]
The problematic Kra file
> #6 0x00000032d5505dd1 in KArchiveDirectory::~KArchiveDirectory() () from /lib64/libkdecore.so.5
Please install debug symbols and try to provide a better backtrace.
Created attachment 80511 [details]
A new Kcrash file
Is this useful or I have to reproduce the bug again?
I installed the debug symbols, but I don't know if bugtrace is refreshed.
Hi Eduardo, Thanks for your report. I haven't been able to actually reproduce the crash. I have seen one other bug report with the same backtrace, I think, but I cannot find it at the moment :-( But looking at the code/git log for karchive.cpp, I see: commit 12280e1ab1fe53550b086b260b0a94fc6feb603b Author: Lamarque V. Souza <lamarque@kde.org> Date: Tue Jul 3 22:36:54 2012 -0300 Avoid double delete in KArchive::close. Which looks exactly like the issue here. My suspicion is that this bug is in kdelibs, not krita, and that it is fixed in the next point release of KDE 4.10. Well, if that commit is from July 2012, then it should have been in all 4.10 releases. Maybe related to the qDeleteAll() behavior change issue? Hm... You have to remind me what that issue was again, my mind is turning up a blank here. Boudewijn, since Qt 4.8, you are no longer allowed to do this: QList<Foo *> list; qDeleteAll(list); while _also_ in Foo::~Foo() removing itself from the same list (or doing any other modifications of the list). It is possible that KArchive does exactly that. *** Bug 322352 has been marked as a duplicate of this bug. *** Yes, that looks like the issue. Hello, I can reproduce this bug like clockwork on linux mint MATE: make a new layer, remove the layer, save and *poof* Fortunately the crash happens after the save is complete (when I open the file the changes are still there), but it makes it very difficult to get any painting done! I just wanted to confirm that this is a consistent bug that is effecting multiple users (I noticed the status is unconfirmed). But more importantly I wanted to offer a workaround for users finding this happening to them. One is to not save in the .kra filetype, but if you are using Krita specific features or multiple layers that might not be an option. The other option is to always save with 'save as' and never 'save'. However, if you're like me, you have 'ctrl+s' built very strongly into your automatic muscle memory, so I recommend going into 'settings>>configure shortcuts' then search for 'save as', set it to 'ctrl+s' and confirm. When this bug is fixed you can change it back, but in the meantime you can save using 'ctrl+s' without a crash (just have to click save in the dialog that pops up, which isn't much hassle) I'm going to go out on a limb and guess that this works because 'save as' creates a whole new file from scratch, while 'save' alters the existing file and runs into some kind of indexing error as mentioned above... am I close? :) that sounds like a good guess, but it doesn't seem to be the case. I can reproduce on *buntu, but not opensuse, so I guess the bug also needs to be reported upstream. Hmmm... I should add that I was about halfway through my painting before this problem even started, although it has happened to me intermittently before (even previous versions of krita). This time it started and hasn't stopped, although about 1/20 tries results in a success for no apparent reason (same action exactly). Also, if I open a file and 'save' first thing it usually works, I can keep clicking save with no problem. But as soon as I make a new layer and 'save' it crashes *95% of the time* :) I guess the bug isn't as logical as I hoped... darn! Oh well, atleast I have my workaround. You guys are doing an awesome job with this software by the way, it's amazing! Those nested groups and erase layers are pure gold... *** Bug 325153 has been marked as a duplicate of this bug. *** *** Bug 325522 has been marked as a duplicate of this bug. *** *** Bug 325632 has been marked as a duplicate of this bug. *** Created attachment 83085 [details]
New crash information added by DrKonqi
krita (2.7.1) on KDE Platform 4.11.2 using Qt 4.8.2
- What I was doing when the application crashed:
I save my work in KRA format and it crash. Dosen't matter how many layers or the combination it crash once among X number of saves.
-- Backtrace (Reduced):
#7 0x00007f99c28539c7 in qDeleteAll<QHash<QString, KArchiveEntry*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#8 qDeleteAll<QHash<QString, KArchiveEntry*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
#9 ~KArchiveDirectoryPrivate (this=0x7630580, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:697
#10 KArchiveDirectory::~KArchiveDirectory (this=0x98873c0, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:713
#11 0x00007f99c2853a29 in KArchiveDirectory::~KArchiveDirectory (this=0x98873c0, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:714
Created attachment 83189 [details]
New crash information added by DrKonqi
krita (2.7.1) on KDE Platform 4.11.2 using Qt 4.8.2
- What I was doing when the application crashed:
Saving my work in KRA format with layers, but just outline work no colors or FX.
-- Backtrace (Reduced):
#7 0x00007f8f8873a9c7 in qDeleteAll<QHash<QString, KArchiveEntry*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#8 qDeleteAll<QHash<QString, KArchiveEntry*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
#9 ~KArchiveDirectoryPrivate (this=0x4c8f8e0, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:697
#10 KArchiveDirectory::~KArchiveDirectory (this=0x6d99e80, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:713
#11 0x00007f8f8873aa29 in KArchiveDirectory::~KArchiveDirectory (this=0x6d99e80, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:714
Created attachment 83207 [details]
New crash information added by DrKonqi
krita (2.7.1) on KDE Platform 4.11.2 using Qt 4.8.2
- What I was doing when the application crashed:
Tracing a mask selection, then Krita chrashed.
-- Backtrace (Reduced):
#7 0x00007fac8d76c9c7 in qDeleteAll<QHash<QString, KArchiveEntry*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#8 qDeleteAll<QHash<QString, KArchiveEntry*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
#9 ~KArchiveDirectoryPrivate (this=0x5260680, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:697
#10 KArchiveDirectory::~KArchiveDirectory (this=0x5b7e330, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:713
#11 0x00007fac8d76ca29 in KArchiveDirectory::~KArchiveDirectory (this=0x5b7e330, __in_chrg=<optimized out>) at ../../kdecore/io/karchive.cpp:714
*** Bug 327397 has been marked as a duplicate of this bug. *** The only place where I could reproduce this issue was on Windows, where I use the following patch to avoid the crash. I haven't been able to reproduce on Linux :-( diff --git a/kdecore/io/karchive.cpp b/kdecore/io/karchive.cpp index 88e1de0..a2cff49 100644 --- a/kdecore/io/karchive.cpp +++ b/kdecore/io/karchive.cpp @@ -694,7 +694,10 @@ class KArchiveDirectoryPrivate public: ~KArchiveDirectoryPrivate() { - qDeleteAll(entries); + foreach(KArchiveEntry *entry, entries.values()) { + delete entry; + } + entries.clear(); } QHash<QString, KArchiveEntry *> entries; }; lines 1-16/16 (END) Created attachment 83515 [details]
New crash information added by DrKonqi
krita (2.7.2) on KDE Platform 4.11.2 using Qt 4.8.4
- What I was doing when the application crashed:
I was saving under .kra format.
It crashes at each saving.
The saved file is OK (not corrupted).
-- Backtrace (Reduced):
#6 0x00007f3f38c883df in KArchiveDirectory::~KArchiveDirectory() () from /usr/lib/libkdecore.so.5
#7 0x00007f3f38c88449 in KArchiveDirectory::~KArchiveDirectory() () from /usr/lib/libkdecore.so.5
#8 0x00007f3f38c88848 in KArchive::close() () from /usr/lib/libkdecore.so.5
#9 0x00007f3f3a3bab5c in KoDocument::saveNativeFormatCalligra(KoStore*) () from /usr/lib/libkomain.so.12
#10 0x00007f3f3a3bc12b in KoDocument::saveNativeFormat(QString const&) () from /usr/lib/libkomain.so.12
Boudewijn, could you create a review request for comment #20 ? I am not sure the patch is entirely correct, but we should get something like this into 4.11.4. Our fellow developers on k-c-d might remember the issue and the correct code. Git commit 2986e095a607e1319e68939aa92c5bae32ce73e1 by Friedrich W. H. Kossebau. Committed on 22/11/2013 at 10:20. Pushed by kossebau into branch 'master'. Don't write the implicitely written "mimetype" entry a 2nd time on saving kra files (and thus avoid assumed bug in KZip) REVIEW: 114016 thanks boud for review M +0 -7 krita/ui/kra/kis_kra_saver.cpp http://commits.kde.org/calligra/2986e095a607e1319e68939aa92c5bae32ce73e1 Git commit 282749e063a9bbd93956400ba4548a8af6829f73 by Boudewijn Rempt, on behalf of Friedrich W. H. Kossebau. Committed on 22/11/2013 at 10:20. Pushed by rempt into branch 'calligra/2.7'. Don't write the implicitely written "mimetype" entry a 2nd time on saving kra files (and thus avoid assumed bug in KZip) REVIEW: 114016 thanks boud for review M +0 -7 krita/ui/kra/kis_kra_saver.cpp http://commits.kde.org/calligra/282749e063a9bbd93956400ba4548a8af6829f73 Git commit fa0be8a39623b3bc18454895b4008440f6e4ed0d by Friedrich W. H. Kossebau. Committed on 28/11/2013 at 01:03. Pushed by kossebau into branch 'KDE/4.11'. fix crash in KZip on overwriting existing entries (+ unit test) REVIEW: 114048 thanks Albert for review M +21 -0 kdecore/io/karchive.cpp M +6 -0 kdecore/io/karchive.h M +19 -16 kdecore/io/kzip.cpp M +29 -0 kdecore/tests/karchivetest.cpp M +1 -0 kdecore/tests/karchivetest.h http://commits.kde.org/kdelibs/fa0be8a39623b3bc18454895b4008440f6e4ed0d *** Bug 328882 has been marked as a duplicate of this bug. *** *** Bug 329080 has been marked as a duplicate of this bug. *** *** Bug 335298 has been marked as a duplicate of this bug. *** |