Bug 501522 - Krita crashes when exporting files to JXL, TIF, EXR (haven't tested others)
Summary: Krita crashes when exporting files to JXL, TIF, EXR (haven't tested others)
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 5.2.9
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-15 08:15 UTC by Kyle Devir
Modified: 2025-03-15 12:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
ICC profile for AOC Q27G3XMN from RTINGS (6.68 KB, application/vnd.iccprofile)
2025-03-15 09:42 UTC, Kyle Devir
Details
kwin display settings (96.52 KB, image/png)
2025-03-15 09:46 UTC, Kyle Devir
Details
Broken colour profile? (184.23 KB, image/png)
2025-03-15 10:03 UTC, Kyle Devir
Details
Extracted broken(?) ICC profile (4.24 KB, application/vnd.iccprofile)
2025-03-15 10:08 UTC, Kyle Devir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Devir 2025-03-15 08:15:08 UTC
Backtrace:

Application: Krita (krita), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#8  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#9  0x000072edf82a56d3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#10 0x000072edf824bba0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#11 0x000072edf8233582 in __GI_abort () at abort.c:73
#12 0x000072edf82334eb in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=1333, function=<optimized out>) at assert.c:118
#13 0x000072edf8243c30 in __assert_fail (assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:127
#14 0x000072edad69f31c in cmsIsToneCurveLinear (Curve=<optimized out>) at /usr/src/debug/lcms2/lcms2-2.17/src/cmsgamma.c:1333
#15 cmsIsToneCurveLinear (Curve=<optimized out>) at /usr/src/debug/lcms2/lcms2-2.17/src/cmsgamma.c:1328
#16 0x000072ed95da9868 in LcmsColorProfileContainer::getEstimatedTRC (this=0x5affbfc94d20) at /usr/src/debug/krita/krita-5.2.9/plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.cpp:471
#17 0x000072ed95da9dc6 in IccColorProfile::getEstimatedTRC (this=0x5affbfc03e20) at /usr/src/debug/krita/krita-5.2.9/plugins/color/lcms2engine/colorprofiles/IccColorProfile.cpp:358
#18 0x000072edf7a8e208 in KoColorProfile::getTransferCharacteristics (this=0x5affbfc03e20) at /usr/src/debug/krita/krita-5.2.9/libs/pigment/KoColorProfile.cpp:261
#19 0x000072edfaacccde in KisImportExportManager::fillStaticExportConfigurationProperties (exportConfiguration=..., image=...) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisImportExportManager.cpp:524
#20 0x000072edfaace771 in KisImportExportManager::fillStaticExportConfigurationProperties (this=this@entry=0x5affc28f8f20, exportConfiguration=...) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisImportExportManager.cpp:540
#21 0x000072edfaad3d7c in KisImportExportManager::convert (this=this@entry=0x5affc28f8f20, direction=direction@entry=KisImportExportManager::Export, location=..., realLocation=..., mimeType=..., showWarnings=<optimized out>, exportConfiguration=..., isAsync=<optimized out>, isAdvancedExporting=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisImportExportManager.cpp:460
#22 0x000072edfaad6384 in KisImportExportManager::exportDocumentAsync (this=0x5affc28f8f20, location=..., realLocation=..., mimeType=<optimized out>, status=..., showWarnings=true, exportConfiguration=..., isAdvancedExporting=false) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisImportExportManager.cpp:177
#23 0x000072edfaabc4ff in KisDocument::startExportInBackground (this=0x5affc28ea1d0, actionName=..., location=..., realLocation=..., mimeType=..., showWarnings=true, exportConfiguration=..., isAdvancedExporting=false) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisDocument.cpp:1668
#24 0x000072edfaabdcb4 in KisDocument::initiateSavingInBackground (this=0x5affbfca0c00, actionName=..., receiverObject=<optimized out>, receiverMethod=0x72edfabe5eb0 "1slotCompleteSavingDocument(KritaUtils::ExportFileJob, KisImportExportErrorCode, QString, QString)", job=..., exportConfiguration=..., optionalClonedDocument=..., isAdvancedExporting=false) at /usr/include/qt/QtCore/qflags.h:69
#25 0x000072edfaabe3a0 in KisDocument::initiateSavingInBackground (this=this@entry=0x5affbfca0c00, actionName=..., receiverObject=receiverObject@entry=0x5affbfca0c00, receiverMethod=receiverMethod@entry=0x72edfabe5eb0 "1slotCompleteSavingDocument(KritaUtils::ExportFileJob, KisImportExportErrorCode, QString, QString)", job=..., exportConfiguration=..., isAdvancedExporting=false) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisDocument.cpp:1313
#26 0x000072edfaabe5ba in KisDocument::exportDocumentImpl (this=this@entry=0x5affbfca0c00, job=..., exportConfiguration=..., isAdvancedExporting=isAdvancedExporting@entry=false) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisDocument.cpp:827
#27 0x000072edfaabfcc5 in KisDocument::saveAs (this=0x5affbfca0c00, _path=..., mimeType=..., showWarnings=true, exportConfiguration=...) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisDocument.cpp:909
#28 0x000072edfaae62c3 in KisMainWindow::saveDocument (this=this@entry=0x5affbb4fed30, document=0x5affbfca0c00, saveas=<optimized out>, saveas@entry=true, isExporting=isExporting@entry=false, isAdvancedExporting=isAdvancedExporting@entry=false) at /usr/src/debug/krita/krita-5.2.9/libs/global/kis_shared_ptr.h:209
#29 0x000072edfaae74f4 in KisMainWindow::slotFileSaveAs (this=0x5affbb4fed30) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisMainWindow.cpp:1812
#30 0x000072edf8ae4ae2 in doActivate<false> (sender=0x5affc0682410, signal_index=4, argv=0x7ffe3d2b1450) at kernel/qobject.cpp:3937
#31 0x000072edf9749305 in QAction::triggered (this=this@entry=0x5affc0682410, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#32 0x000072edf974f030 in QAction::activate (this=0x5affc0682410, event=<optimized out>) at kernel/qaction.cpp:1161
#33 0x000072edf974f116 in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1086
#34 QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1075
#35 0x000072edf9756581 in QApplicationPrivate::notify_helper (this=this@entry=0x5affc067e020, receiver=0x5affc0682410, receiver@entry=0x5affbb4fed30, e=e@entry=0x7ffe3d2b16c0) at kernel/qapplication.cpp:3640
#36 0x000072edf975af38 in QApplication::notify (this=this@entry=0x7ffe3d2b1d40, receiver=0x5affbb4fed30, receiver@entry=0x5affc0682410, e=e@entry=0x7ffe3d2b16c0) at kernel/qapplication.cpp:3386
#37 0x000072edfaaae3df in KisApplication::notify (this=0x7ffe3d2b1d40, receiver=0x5affc0682410, event=0x7ffe3d2b16c0) at /usr/src/debug/krita/krita-5.2.9/libs/ui/KisApplication.cpp:771
#38 0x000072edf8ab0418 in QCoreApplication::notifyInternal2 (receiver=0x5affc0682410, event=0x7ffe3d2b16c0) at kernel/qcoreapplication.cpp:1064
#39 0x000072edf8ab0483 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#40 0x000072edf8f6fce5 in QShortcutMap::dispatchEvent (this=this@entry=0x5affb9be8878, e=e@entry=0x7ffe3d2b1790) at kernel/qshortcutmap.cpp:675
#41 0x000072edf8f70285 in QShortcutMap::tryShortcut (this=0x5affb9be8878, e=0x7ffe3d2b1790) at kernel/qshortcutmap.cpp:343
#42 0x000072edf8f1ea32 in QWindowSystemInterface::handleShortcutEvent (window=<optimized out>, timestamp=79103345, keyCode=83, modifiers=..., nativeScanCode=39, nativeVirtualKey=83, nativeModifiers=5, text=..., autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:477
#43 0x000072edf8f385e6 in QGuiApplicationPrivate::processKeyEvent (e=0x5affbbbd1d20) at kernel/qguiapplication.cpp:2398
#44 0x000072edf8f1d2cd in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#45 0x000072edf232fa98 in xcbSourceDispatch (source=source@entry=0x5affb9c59de0) at /usr/src/debug/qt5-base/kde-qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:105
#46 0x000072edf6106104 in g_main_dispatch (context=0x5affb98b7d40) at ../glib/glib/gmain.c:3398
#47 0x000072edf6169d57 in g_main_context_dispatch_unlocked (context=0x5affb98b7d40) at ../glib/glib/gmain.c:4249
#48 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5affb98b7d40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4314
#49 0x000072edf6105535 in g_main_context_iteration (context=0x5affb98b7d40, may_block=1) at ../glib/glib/gmain.c:4379
#50 0x000072edf8aff72f in QEventDispatcherGlib::processEvents (this=0x5affb9c59870, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#51 0x000072edf8aa80dc in QEventLoop::exec (this=0x7ffe3d2b1b60, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#52 0x000072edf8ab45dd in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#53 0x000072edf8f2f87f in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#54 0x000072edf9754a2a in QApplication::exec () at kernel/qapplication.cpp:2832
#55 0x00005aff90b59009 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/krita/krita-5.2.9/krita/main.cc:794
[Inferior 1 (process 550248) detached]



SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.14.0-rc6-1-custom-bcachefs-git-00120-gffca3a38a34c (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 32 GiB of RAM (30.4 GiB usable)
Graphics Processor 1: AMD Radeon RX 7900 XTX
Graphics Processor 2: AMD Radeon Graphics
Manufacturer: ASRock
Product Name: X670E Pro RS
Comment 1 wolthera 2025-03-15 09:30:05 UTC
Looks like you have a broken icc profile on your system. Could you somehow share that with us, so we can use it for testing?
Comment 2 Kyle Devir 2025-03-15 09:42:38 UTC
Created attachment 179420 [details]
ICC profile for AOC Q27G3XMN from RTINGS
Comment 3 Kyle Devir 2025-03-15 09:45:25 UTC
(In reply to wolthera from comment #1)
> Looks like you have a broken icc profile on your system. Could you somehow
> share that with us, so we can use it for testing?

Done. Though, weirdly, this shouldn't matter, because I'm using DisplayHDR... or maybe that is the problem? It overrides the ICC profile on kwin Wayland supposedly...
Comment 4 Kyle Devir 2025-03-15 09:46:34 UTC
Created attachment 179421 [details]
kwin display settings
Comment 5 wolthera 2025-03-15 10:00:47 UTC
Thanks! Thankfully that display profile isn't the cause of this crash. Did the images you were exporting have any particular display profile, or was it the stock sRGB-elle-V2-srgbtrc one?
Comment 6 Kyle Devir 2025-03-15 10:03:16 UTC
Created attachment 179422 [details]
Broken colour profile?
Comment 7 Kyle Devir 2025-03-15 10:08:03 UTC
Created attachment 179423 [details]
Extracted broken(?) ICC profile
Comment 8 Kyle Devir 2025-03-15 10:08:37 UTC
(In reply to wolthera from comment #5)
> Thanks! Thankfully that display profile isn't the cause of this crash. Did
> the images you were exporting have any particular display profile, or was it
> the stock sRGB-elle-V2-srgbtrc one?

Extracted culprit ICC profile from image with exiftool
Comment 9 wolthera 2025-03-15 10:25:34 UTC
Yep! That was the culprit!

From what I can see, the problem is that this profile only has a cicp entry (which we do not support reading yet), but no tone response curve encoded whatsoever... Looks like it was made by the jpeg-xl team too.

I think we have enough info to fix the bug, now to make a plan.
Comment 10 wolthera 2025-03-15 10:29:41 UTC
BTW, I forgot to reply to your other comment: Krita doesn't support wayland yet, so it isn't yet integrating with kwin's color management. If you have the color profile in the krita settings set to sRGB, it should be fine for now, kwin, I think will treat Krita, as a non-wayland application, as an sRGB application.

We hope to start wayland integration after the Qt6 port is done, which we're well underway on, but it can still take some time.
Comment 11 Kyle Devir 2025-03-15 12:07:08 UTC
(In reply to wolthera from comment #10)
> BTW, I forgot to reply to your other comment: Krita doesn't support wayland
> yet, so it isn't yet integrating with kwin's color management. If you have
> the color profile in the krita settings set to sRGB, it should be fine for
> now, kwin, I think will treat Krita, as a non-wayland application, as an
> sRGB application.
> 
> We hope to start wayland integration after the Qt6 port is done, which we're
> well underway on, but it can still take some time.

kwin actually has HDR support now, so I've been waiting eagerly to test that out :)