Bug 490301

Summary: Krita crashes on macOS when turning on HDR in display settings
Product: [Applications] krita Reporter: mich <miky3848>
Component: HDRAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: dimula73, halla, insertopen, penguinflyer2222
Priority: NOR    
Version: 5.2.3-beta1   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mich 2024-07-15 11:47:42 UTC
SUMMARY


STEPS TO REPRODUCE
1. Download krita 5.2.3 through dmg or brew on macOS (arm) 
2. Go in display settings and switch from sRGB 8 bit to 10 bit
3. Close and Open Krita to apply HDR settings
4. Krita won't ever open again


macOS: 14.5

Error Report: https://pastebin.com/NVe0hQwn
Comment 1 Freya Lupen 2024-07-15 13:02:05 UTC
Confirmed on macOS with 5.2.3 and 5.3.0-prealpha-1c2c28d1, it also happens with 5.2.2.

To change it back to 8-bit and prevent the crash, open ~/Library/Preferences/kritadisplayrc and remove the line 'rootSurfaceFormat=bt2020-pq'.
Comment 2 Dmitry Kazakov 2024-07-16 07:51:01 UTC
How did it happen that HDR feature is available on MacOS? I guess it was never designed to work on MacOS...
Comment 3 Halla Rempt 2024-07-27 08:09:22 UTC
Looks like none of the hdr code is disabled on any platform that doesn't support HDR. That includes Linux, btw.
Comment 4 Halla Rempt 2024-07-27 08:12:57 UTC
QSurfaceFormat::setColorSpace(QSurfaceFormat::ColorSpace colorSpace) is deprecated in Qt6...
Comment 5 Halla Rempt 2024-07-27 08:22:02 UTC
Git commit 3cfd68df06eedb66e40ac7f2bbe93de250c92344 by Halla Rempt.
Committed on 27/07/2024 at 08:21.
Pushed by rempt into branch 'master'.

Only check for the presence of bt2020PQColorSpace on Windows

Since we use sh_zam's Qt branch on all platforms, bt2020PQColorSpace
and scRGBColorSpace are defined on all platforms, making
config-hdr.cmake.in always define HAVE_HDR.

M  +14   -10   CMakeLists.txt

https://invent.kde.org/graphics/krita/-/commit/3cfd68df06eedb66e40ac7f2bbe93de250c92344
Comment 6 Halla Rempt 2024-07-27 08:22:18 UTC
Git commit 3599b59e26ac4dff5343b7fb592cefdc7d1f442f by Halla Rempt.
Committed on 27/07/2024 at 08:22.
Pushed by rempt into branch 'krita/5.2'.

Only check for the presence of bt2020PQColorSpace on Windows

Since we use sh_zam's Qt branch on all platforms, bt2020PQColorSpace
and scRGBColorSpace are defined on all platforms, making
config-hdr.cmake.in always define HAVE_HDR.
(cherry picked from commit c623c18c953e7bd3a619bab43f05176e1a1f90fb)

M  +14   -10   CMakeLists.txt

https://invent.kde.org/graphics/krita/-/commit/3599b59e26ac4dff5343b7fb592cefdc7d1f442f
Comment 7 Freya Lupen 2024-08-21 15:38:54 UTC
*** Bug 484564 has been marked as a duplicate of this bug. ***