https://bugs.kde.org/show_bug.cgi?id=491475
Bug ID: 491475 Summary: The command line option "--file-layer" crashes Krita. Classification: Applications Product: krita Version: 5.2.3 Platform: Other OS: All Status: REPORTED Severity: crash Priority: NOR Component: General Assignee: krita-bugs-n...@kde.org Reporter: chen...@disroot.org Target Milestone: --- Created attachment 172433 --> https://bugs.kde.org/attachment.cgi?id=172433&action=edit The archive containing image.png and document.kra SUMMARY The command line option "--file-layer" crashes Krita. Krita crashes once this option is set to an existing file or directory. Tested on macOS and Arch Linux with KDE Plasma. STEPS TO REPRODUCE 1. Run "krita --file-layer IMAGE KRITA_DOCUMENT.kra". This crashes even if IMAGE is an empty file or a directory. OBSERVED RESULT Krita crashes. EXPECTED RESULT Krita properly starts and insert the image as a file layer. SOFTWARE/OS VERSIONS Windows: Haven't tested. macOS: Sonoma 14.5 Linux: Distro: Arch Linux KDE Plasma Version: 6.1.3 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.2 ADDITIONAL INFORMATION Downgrading to version 5.2.2 seems to solve this issue on macOS. The following backtraces are produced on Arch Linux. Running "gdb --args krita --file-layer /tmp/test-krita/image.png /tmp/test-krita/document.kra" gives the backtrace: ``` #0 0x00007ffff7171980 in KisNode::parent This crashes even if IMAGE is an empty file or a directory, at /usr/src/debug/krita/krita-5.2.3/libs/image/kis_node.cpp:316 #1 0x00007ffff7aa04d0 in KisApplication::start (this=this@entry=0x7fffffffc940, args=...) at /usr/src/debug/krita/krita-5.2.3/libs/global/kis_shared_ptr.h:170 #2 0x000055555555bfeb in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/krita/krita-5.2.3/krita/main.cc:787 ``` Running `gdb --args krita --file-layer /tmp/test-krita/empty_file /tmp/test-krita/document.kra`, where "empty_file" is an empty file, gives the backtrace: ``` #0 0x00007ffff7171980 in KisNode::parent (this=0x0) at /usr/src/debug/krita/krita-5.2.3/libs/image/kis_node.cpp:316 #1 0x00007ffff7aa04d0 in KisApplication::start (this=this@entry=0x7fffffffc940, args=...) at /usr/src/debug/krita/krita-5.2.3/libs/global/kis_shared_ptr.h:170 #2 0x000055555555bfeb in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/krita/krita-5.2.3/krita/main.cc:787 ``` Running `gdb --args krita --file-layer /tmp/test-krita/ /tmp/test-krita/document.kra`, where "test-krita" is a directory, gives the backtrace: ``` #0 0x00007ffff7171980 in KisNode::parent (this=0x0) at /usr/src/debug/krita/krita-5.2.3/libs/image/kis_node.cpp:316 #1 0x00007ffff7aa04d0 in KisApplication::start (this=this@entry=0x7fffffffc950, args=...) at /usr/src/debug/krita/krita-5.2.3/libs/global/kis_shared_ptr.h:170 #2 0x000055555555bfeb in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/krita/krita-5.2.3/krita/main.cc:787 ``` The relevant files "image.png" and "document.kra" are attached as a zip archive. -- You are receiving this mail because: You are watching all bug changes.