Summary: | Krita crashes when trying to export mixed channel depth images to Photoshop .psd file | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Audrey Toskin <andrew> |
Component: | File formats | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | halla, sven.langkamp |
Priority: | NOR | ||
Version: | 2.8.5 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/calligra/fa0a7643e795a4dd383a1fe787a010312206a80a | Version Fixed In: | |
Sentry Crash Report: |
Description
Audrey Toskin
2014-10-04 23:17:44 UTC
Oops, sorry. Correction: One of the times I tried to export a .psd file, Krita did not crash, but the .psd file was still corrupted. Do you have some test kra files that produce the problem. Saving psd files works here. I actually suspect that the issue is that 2.8 has this problem with 16 bit files; it should be fixed in git master. But yes, a .kra that causes the crash would be very welcome, than we can make sure. Here are links to some of the Krita files I've tried. * https://archive.org/download/Tony--by-Niccolo-Florence/Tony.kra * https://archive.org/download/Ayn-Rand-as-a-Ferengi--by-Niccolo-Florence/Ayn%20Rand%20as%20a%20Ferengi.kra * https://archive.org/download/Robin-Williams-tribute--by-Niccolo-Florence/Robin%20Williams.kra Thanks for taking a look. Thanks! I can reproduce the crash now, and get a nice backtrace: Thread 1 (Thread 0x7fa70b82a8c0 (LWP 391)): [KCrash Handler] #5 0x00007fa70ae5ed27 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #6 0x00007fa70ae60418 in __GI_abort () at abort.c:89 #7 0x00007fa70aea09f4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fa70afa9a40 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #8 0x00007fa70aea8006 in malloc_printerr (ptr=<optimized out>, str=0x7fa70afa9b70 "double free or corruption (out)", action=1) at malloc.c:4996 #9 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840 #10 0x00007fa683273c8d in qDeleteAll<unsigned char* const*> (end=0x1dc41b50, begin=0x1dc41b30) at /usr/include/qt4/QtCore/qalgorithms.h:322 #11 qDeleteAll<QVector<unsigned char*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330 #12 PSDLayerRecord::writePixelData (this=this@entry=0x274d8320, io=io@entry=0x7fff45abd490) at /home/boud/kde/src/calligra/krita/plugins/formats/psd/psd_layer_record.cpp:747 #13 0x00007fa68326cd21 in PSDLayerSection::write (this=this@entry=0x7fff45abd590, io=io@entry=0x7fff45abd490, rootLayer=...) at /home/boud/kde/src/calligra/krita/plugins/formats/psd/psd_layer_section.cpp:347 #14 0x00007fa683259a52 in PSDSaver::buildFile (this=this@entry=0x7fff45abd810, uri=...) at /home/boud/kde/src/calligra/krita/plugins/formats/psd/psd_saver.cpp:222 #15 0x00007fa683256065 in psdExport::convert (this=<optimized out>, from=..., to=...) at /home/boud/kde/src/calligra/krita/plugins/formats/psd/psd_export.cc:87 #16 0x00007fa70a37a5d2 in CalligraFilter::ChainLink::invokeFilter (this=0xa01a790, parentChainLink=parentChainLink@entry=0x0) at /home/boud/kde/src/calligra/libs/main/KoFilterChainLink.cpp:88 #17 0x00007fa70a370d00 in KoFilterChain::invokeChain (this=0x274e3600) at /home/boud/kde/src/calligra/libs/main/KoFilterChain.cpp:95 #18 0x00007fa70a36b280 in KoFilterManager::exportDocument (this=0x66cdd60, url=..., mimeType=...) at /home/boud/kde/src/calligra/libs/main/KoFilterManager.cpp:241 #19 0x00007fa70a3016d3 in KoDocument::saveFile (this=0x6610b20) at /home/boud/kde/src/calligra/libs/main/KoDocument.cpp:583 #20 0x00007fa70a30de54 in KoDocument::save (this=0x6610b20) at /home/boud/kde/src/calligra/libs/main/KoDocument.cpp:2503 #21 0x00007fa70a30fd07 in KoDocument::saveAs (this=0x6610b20, kurl=...) at /home/boud/kde/src/calligra/libs/main/KoDocument.cpp:2472 #22 0x00007fa70a33f2da in KoMainWindow::saveDocument (this=this@entry=0x6628fa0, saveas=<optimized out>, saveas@entry=true, silent=silent@entry=false, specialOutputFlag=specialOutputFlag@entry=0) at /home/boud/kde/src/calligra/libs/main/KoMainWindow.cpp:1088 #23 0x00007fa70a3406a2 in KoMainWindow::slotFileSaveAs (this=0x6628fa0) at /home/boud/kde/src/calligra/libs/main/KoMainWindow.cpp:1356 #24 0x00007fa70a343740 in KoMainWindow::qt_static_metacall (_o=0x6628fa0, _c=<optimized out>, _id=11, _a=0x7fff45abe630) at /home/boud/kde/build/calligra/libs/main/KoMainWindow.moc:137 #25 0x00007fa708daea7a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #26 0x00007fa70979dbf2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #27 0x00007fa70979f5c3 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #28 0x00007fa709bd59b9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #29 0x00007fa709bda059 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #30 0x00007fa709bdc3b1 in QMenu::keyPressEvent(QKeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #31 0x00007fa7046cbf30 in KMenu::keyPressEvent(QKeyEvent*) () from /usr/lib/libkdeui.so.5 #32 0x00007fa7097f4565 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #33 0x00007fa709bdde7b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #34 0x00007fa7097a411c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #35 0x00007fa7097ac01b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #36 0x00007fa70a2fac77 in KoApplication::notify (this=<optimized out>, receiver=0x6703210, event=0x7fff45abec90) at /home/boud/kde/src/calligra/libs/main/KoApplication.cpp:621 #37 0x00007fa708d9a86d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #38 0x00007fa7098449e0 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #39 0x00007fa709844e62 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #40 0x00007fa70981e48c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #41 0x00007fa709847d90 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #42 0x00007fa708d994f1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #43 0x00007fa708d99805 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #44 0x00007fa708d9ef67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #45 0x00007fa70b3050b0 in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/boud/kde/src/calligra/krita/main.cc:104 #46 0x00007fa70ae49ec5 in __libc_start_main (main=0x4006c0 <main(int, char**)>, argc=2, argv=0x7fff45abf6d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff45abf6c8) at libc-start.c:287 #47 0x00000000004006ee in _start () I also think I know what's going on. Krita can handle mixed images: you have 8 and 16 bit integer RGB layers in this image, while the image itself is set to 16 bit integer RGB. Photoshop cannot handle that, and our code cannot handle converting the layers to the image colorspace while saving. Git commit fa0a7643e795a4dd383a1fe787a010312206a80a by Boudewijn Rempt. Committed on 05/11/2014 at 11:41. Pushed by rempt into branch 'master'. Check that the image is homogenous before converting to PSD PSD cannot handle images with layers in different colorspaces and bit depths, so give an error message if that's the case. M +31 -0 krita/plugins/formats/psd/psd_export.cc http://commits.kde.org/calligra/fa0a7643e795a4dd383a1fe787a010312206a80a |