Bug 509875 - Krita crashes on loading TIFF image with CIE Lab format and embedded ICC profile
Summary: Krita crashes on loading TIFF image with CIE Lab format and embedded ICC profile
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: File formats (other bugs)
Version First Reported In: 5.2.13
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-24 16:25 UTC by dusan.peterc
Modified: 2025-09-24 16:58 UTC (History)
1 user (show)

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


Attachments
TIFF image in CIE Lab format with embedded ICC profile set to D65 (816.55 KB, image/tiff)
2025-09-24 16:25 UTC, dusan.peterc
Details
ICC profile for CIE Lab D65 absolute colorimetric intent (524 bytes, application/vnd.iccprofile)
2025-09-24 16:27 UTC, dusan.peterc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dusan.peterc 2025-09-24 16:25:30 UTC
Created attachment 185217 [details]
TIFF image in CIE Lab format with embedded ICC profile set to D65

SUMMARY


STEPS TO REPRODUCE
1. Open Krita 
2. Load the TIFF image in CIE Lab format with embedded ICC profile

or
1. Open Krita 
2. Open any image and try to associate ICC profile which is in the attachment

OBSERVED RESULT
Crash

EXPECTED RESULT
Correct loading of the profile and interpretation of the image as CIE Lab D65 with absolute colorimetric intent

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Operating System: openSUSE Leap 15.6
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.4.0-150600.23.70-default (64-bit)
Graphics Platform: offscreen
Processors: 20 × 13th Gen Intel® Core™ i9-13900H
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® Graphics


ADDITIONAL INFORMATION
Comment 1 dusan.peterc 2025-09-24 16:27:47 UTC
Created attachment 185218 [details]
ICC profile for CIE Lab D65 absolute colorimetric intent

Try to load this profile and Krita will crash on loading it.
Comment 2 dusan.peterc 2025-09-24 16:30:09 UTC
Profile itself is correct, as reported by "iccdump LabD65abs.icc"
icc:
Header:
  size         = 524 bytes
  CMM          = 'lcms'
  Version      = 2.4.0
  Device Class = Abstract
  Color Space  = Lab
  Conn. Space  = Lab
  Date, Time   = 23 Sep 2025, 16:57:52
  Platform     = Unrecognized - 'LIN '
  Flags        = Not Embedded Profile, Use anywhere
  Dev. Mnfctr. = 0x0
  Dev. Model   = 0x0
  Dev. Attrbts = Reflective, Glossy, Positive, Color
  Rndrng Intnt = Absolute Colorimetric
  Illuminant   = 0.96420288, 1.00000000, 0.82490540    [Lab 100.000000, 0.000000, 0.000000]
  Creator      = 'lcms'

tag 0:
  sig      'desc'
  type     0x3d
  offset   192
  size     320

tag 1:
  sig      'cprt'
  type     0x6500
  offset   348
  size     33

tag 2:
  sig      'wtpt'
  type     0x7300
  offset   384
  size     20

tag 3:
  sig      'chad'
  type     0x6500
  offset   404
  size     44
Comment 3 Halla Rempt 2025-09-24 16:58:33 UTC
Looks like LCMS has a problem here:

krita.lib.pigment: Lcms2 error:  13 Couldn't link the profiles
krita.lib.pigment: Lcms2 error:  13 Couldn't link the profiles
SAFE ASSERT (krita): "d->defaultTransformations->toRGB" in file /builds/graphics/krita/plugins/color/lcms2engine/LcmsColorSpace.h, line 230
krita.lib.pigment: Lcms2 error:  13 Couldn't link the profiles
SAFE ASSERT (krita): "d->defaultTransformations->toRGB16" in file /builds/graphics/krita/plugins/color/lcms2engine/LcmsColorSpace.h, line 238
krita.lib.pigment: Lcms2 error:  13 Couldn't link the profiles
Segmentation fault (core dumped)

I can confirm the crash, but... Given that the segfault is inside LCMS, we'll need to figure out whether it's a bug in the library or in Krita.