| Summary: | The command line option "--file-layer" crashes Krita. | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Yushun Cheng <chengys> |
| Component: | General | Assignee: | Dmitry Kazakov <dimula73> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | dimula73 |
| Priority: | NOR | ||
| Version First Reported In: | 5.2.3 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | All | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | The archive containing image.png and document.kra | ||
It seems that there's an error with the first backtrace. Running "gdb --args krita --file-layer /tmp/test-krita/image.png /tmp/test-krita/document.kra" actually gives
#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
Hopefully it hasn't caused any confusion :-)
I forgot to mention that on both macOS and Arch Linux, the process was terminated by SIGSEGV. Hi, Yushun! Could you please check Krita Plus? I think I have fixed the bug quite recently: https://cdn.kde.org/ci-builds/graphics/krita/krita-5.2/linux/ I checked it and indeed it doesn't crash anymore. Thank you very much! |
Created attachment 172433 [details] 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.