Bug 463079

Summary: CMYK JXL files are causing krita to crash
Product: [Applications] krita Reporter: dnovomesky
Component: File formatsAssignee: amyspark <amy>
Status: RESOLVED FIXED    
Severity: crash CC: griffinvalley, qampidh
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: various JPEG XL files

Description dnovomesky 2022-12-15 18:09:37 UTC
Created attachment 154602 [details]
various JPEG XL files

Hello,

I am experimenting with CMYK in JPEG XL. I created the attached .jxl files (in testfiles.zip).
Krita always crash when I attempt to open them.

I tried with https://charlotte.kde.org/binary-factory/Krita_Nightly_Windows_Build/lastSuccessfulBuild/krita-nightly-x64-5.2.0-prealpha-6194c29fd8-setup.exe
Comment 1 wolthera 2022-12-15 18:12:39 UTC
Assigning amy, as they're responsible for the jxl support.
Comment 2 Kampidh 2022-12-16 17:05:13 UTC
I can't reproduce the crash on 5.1.4 or 5.2.0 master [9d2afb5b], but instead the image just failed to load.

Also, I believe we are still currently removed the CMYK support for JXL for now?
Comment 3 dnovomesky 2022-12-16 18:43:15 UTC
(In reply to Kampidh from comment #2)
> I can't reproduce the crash on 5.1.4 or 5.2.0 master [9d2afb5b], but instead
> the image just failed to load.
> 
> Also, I believe we are still currently removed the CMYK support for JXL for
> now?

Do you use build with libjxl 0.7 ? When it is not found, JXL support is not working.

I get segmentation fault on Linux with krita-5.2.0-prealpha-9d2afb5b7e-x86_64.appimage
Comment 4 Kampidh 2022-12-17 00:52:50 UTC
(In reply to dnovomesky from comment #3)
> (In reply to Kampidh from comment #2)
> > I can't reproduce the crash on 5.1.4 or 5.2.0 master [9d2afb5b], but instead
> > the image just failed to load.
> > 
> > Also, I believe we are still currently removed the CMYK support for JXL for
> > now?
> 
> Do you use build with libjxl 0.7 ? When it is not found, JXL support is not
> working.
> 
> I get segmentation fault on Linux with
> krita-5.2.0-prealpha-9d2afb5b7e-x86_64.appimage

I tested it with win10 system.
Anyway I confirmed the crash happens when opening the file from File->Open or right clicking the file on explorer and "Open with -> Krita".

Crash didn't happen when drag-dropping the image to Krita's window, but just didn't load as I specified before.
Comment 5 Bug Janitor Service 2022-12-17 02:24:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1673