SUMMARY Application crashes when trying to use "Flatten Image" on an image that has reference pictures in use STEPS TO REPRODUCE 1. Create image with more than one layer 2. Add reference images 3. Use command "Flatten Image" OBSERVED RESULT Application crashes EXPECTED RESULT Application not crashing SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION Backtrace (not sure if this is the right thing, I'm not used to doing this) Thread 1 "AppRun" received signal SIGSEGV, Segmentation fault. 0x00007ffff6d5ccd0 in KisImage::xRes() const () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaimage.so.17 (gdb) backtrace #0 0x00007ffff6d5ccd0 in KisImage::xRes() const () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaimage.so.17 #1 0x00007ffff77f51f7 in KisImageViewConverter::zoom(double*, double*) const () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaui.so.17 #2 0x00007ffff311d1c4 in KoViewConverter::documentToView() const () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaflake.so.17 #3 0x00007ffff7b9c71e in KisReferenceImagesLayer::paintReferences(QPainter&) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaui.so.17 #4 0x00007ffff7b975f7 in ?? () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaui.so.17 #5 0x00007ffff7b95a90 in ?? () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaui.so.17 #6 0x00007ffff769c709 in ?? () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaui.so.17 #7 0x00007ffff52c34f1 in QObject::event(QEvent*) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #8 0x00007ffff5d728dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Widgets.so.5 #9 0x00007ffff5d79f20 in QApplication::notify(QObject*, QEvent*) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Widgets.so.5 #10 0x00007ffff7af0d92 in KisApplication::notify(QObject*, QEvent*) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libkritaui.so.17 #11 0x00007ffff52954f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) --Type <RET> for more, q to quit, c to continue without paging-- () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #12 0x00007ffff52981aa in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #13 0x00007ffff52ef233 in ?? () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #14 0x00007fffee97217d in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #15 0x00007fffee972400 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #16 0x00007fffee9724a3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #17 0x00007ffff52ee81f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #18 0x00007ffff5293a8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #19 0x00007ffff529c804 in QCoreApplication::exec() () from /tmp/.mount_krita-ibUvut/usr/bin/../lib/libQt5Core.so.5 #20 0x0000000000407750 in main ()
I cannot reproduce this with the 5.0.2 appimage.
I can repo on Arch. Flattening, scaling, and converting color space all causes Krita to freeze and crash - but the 5.0.2 appimage, and Arch's 5.0.2 package. After deleting the reference images neither of those actions cause a problem.
Like I said, I can't reproduce, so we need more information, for instance the size and color model of the krita image, size, type and number of reference images... Maybe just attach the krita.log file.
SESSION: 11 Apr 2022 21:02:02 +0200. Executing krita Krita Version: 5.0.2, Qt version compiled: 5.15.2, loaded: 5.15.3. Process ID: 13115 -- -- -- -- -- -- -- -- 11 Apr 2022 21:02:02 +0200: Style: breeze. Available styles: Breeze, Oxygen, Windows, Fusion 11 Apr 2022 21:02:04 +0200: Database is up to date. Version: 0.0.15, created by Krita 5.0.0, at Sat Jan 1 20:32:58 2022 11 Apr 2022 21:02:06 +0200: Could not load resourcepalettes/Palette1.kpl 11 Apr 2022 21:02:06 +0200: Could not load resourcepalettes/Palette2.kpl 11 Apr 2022 21:02:06 +0200: Could not load resourcepalettes/Palette3.kpl 11 Apr 2022 21:02:06 +0200: Could not load resourcepalettes/Palette.kpl 11 Apr 2022 21:02:06 +0200: Could not retrieve md5 for resourcepaintoppresets/Special_dyna_dots.kpp 11 Apr 2022 21:02:06 +0200: Could not add resource{d45362f1-dbd3-424d-803c-57565ccf0757} 11 Apr 2022 21:02:06 +0200: Could not retrieve md5 for resourcepalettes/Pastel5x2.kpl 11 Apr 2022 21:02:08 +0200: SAFE ASSERT (krita): "result.size() == 1" in file /build/krita/src/krita-5.0.2/libs/resources/KisStoragePlugin.cpp, line 92 11 Apr 2022 21:02:21 +0200: Removing autosave file: /home/storm/Data/Art/--Digital/--Source/Jasper-bust/Jasper-bust.kra-autosave.kra 11 Apr 2022 21:02:21 +0200: Importing application/x-krita to application/x-krita. Location: /home/storm/Data/Art/--Digital/--Source/Jasper-bust/Jasper-bust.kra. Real location: /home/storm/Data/Art/--Digital/--Source/Jasper-bust/Jasper-bust.kra. Batchmode: 0 11 Apr 2022 21:02:23 +0200: Loaded image from application/x-krita. Size: 2481 * 3509 pixels, 4.16667 dpi. Color model: 16-bit integer/channel RGB/Alpha (sRGB-elle-V2-g10.icc). Layers: 11 KRITA DID NOT CLOSE CORRECTLY
I've also just created a new image in 8 bit, pasted a random image from Google as ref, made 3 layers, tried to flatten, and the same happened. So it's not tied to the file I was working on.
*** This bug has been marked as a duplicate of bug 455135 ***