https://bugs.kde.org/show_bug.cgi?id=515052

            Bug ID: 515052
           Summary: icc profile creation triggered assertion failure when
                    saving .kra file (native Wayland)
    Classification: Applications
           Product: krita
      Version First git master (please specify the git hash!)
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: * Unknown
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

When krita is saving .kra file to a named destination, it hit assertion failure
at
https://invent.kde.org/graphics/krita/-/blob/master/plugins/color/lcms2engine/colorprofiles/IccColorProfile.cpp#L147
and failed to actually save the file

The issue seems to be pretty random and I cannot reproduce, nevertheless, it
would be nice if krita can properly handle error and avoid crashing here when
LCMS returns a nullptr

```
#0  0x00007ffff249df1c in __pthread_kill_implementation () from
/nix/store/j193mfi0f921y0kfs8vjc1znnr45ispv-glibc-2.40-66/lib/libc.so.6
#1  0x00007ffff2441cee in raise () from
/nix/store/j193mfi0f921y0kfs8vjc1znnr45ispv-glibc-2.40-66/lib/libc.so.6
#2  0x00007ffff2428941 in abort () from
/nix/store/j193mfi0f921y0kfs8vjc1znnr45ispv-glibc-2.40-66/lib/libc.so.6
#3  0x00007ffff2cd74ee in qAbort() () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#4  0x00007ffff2d2e281 in qt_message(QtMsgType, QMessageLogContext const&, char
const*, __va_list_tag*) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#5  0x00007ffff2cd8d42 in QMessageLogger::fatal(char const*, ...) const () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#6  0x00007ffff4b7f708 in kis_assert_common(char const*, char const*, int,
bool, bool) () from
/home/user/sources/krita/outputs/out/lib/libkritaglobal.so.21
#7  0x00007fffb154885b in IccColorProfile::IccColorProfile(QList<double>
const&, ColorPrimaries, TransferCharacteristics) () from
/home/user/sources/krita/outputs/out/lib/kritaplugins/kritalcmsengine.so
#8  0x00007fffb154ba8b in IccColorSpaceEngine::getProfile(QList<double> const&,
ColorPrimaries, TransferCharacteristics) () from
/home/user/sources/krita/outputs/out/lib/kritaplugins/kritalcmsengine.so
#9  0x00007ffff58da13d in KoColorSpaceRegistry::profileFor(QList<double>
const&, ColorPrimaries, TransferCharacteristics) const () from
/home/user/sources/krita/outputs/out/lib/libkritapigment.so.21
#10 0x00007ffff7c624ff in
KisCanvasSurfaceColorSpaceManager::reinitializeSurfaceDescription(std::pair<KoColorConversionTransformation::Intent,
QFlags<KoColorConversionTransformation::ConversionFlag> > const&) ()
   from /home/user/sources/krita/outputs/out/lib/libkritaui.so.21
#11 0x00007ffff7c632da in
KisCanvasSurfaceColorSpaceManager::slotInterfacePreferredDescriptionChanged()
() from /home/user/sources/krita/outputs/out/lib/libkritaui.so.21
#12 0x00007ffff2e2db09 in void doActivate<false>(QObject*, int, void**) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#13 0x00007ffff3f55f7e in
KisSurfaceColorManagerInterface::sigPreferredSurfaceDescriptionChanged(KisSurfaceColorimetry::SurfaceDescription
const&) ()
   from
/home/user/sources/krita/outputs/out/lib/libkritasurfacecolormanagementapi.so.21
#14 0x00007ffff2e2db09 in void doActivate<false>(QObject*, int, void**) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#15 0x00007ffff2e2db09 in void doActivate<false>(QObject*, int, void**) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#16 0x00007ffff2e2db09 in void doActivate<false>(QObject*, int, void**) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#17 0x00007ffff0854052 in ffi_call_unix64 () from
/nix/store/1z031fwbsc8jhmm7i39r6z6m1xn7rbza-libffi-3.5.2/lib/libffi.so.8
#18 0x00007ffff085275c in ffi_call_int () from
/nix/store/1z031fwbsc8jhmm7i39r6z6m1xn7rbza-libffi-3.5.2/lib/libffi.so.8
#19 0x00007ffff08532ae in ffi_call () from
/nix/store/1z031fwbsc8jhmm7i39r6z6m1xn7rbza-libffi-3.5.2/lib/libffi.so.8
#20 0x00007ffff15ad88c in wl_closure_invoke () from
/nix/store/1b360ym6mfhwfj9s525bcympm5vav6np-wayland-1.24.0/lib/libwayland-client.so.0
#21 0x00007ffff15a9094 in dispatch_event () from
/nix/store/1b360ym6mfhwfj9s525bcympm5vav6np-wayland-1.24.0/lib/libwayland-client.so.0
#22 0x00007ffff15aa2db in wl_display_dispatch_queue_pending () from
/nix/store/1b360ym6mfhwfj9s525bcympm5vav6np-wayland-1.24.0/lib/libwayland-client.so.0
#23 0x00007ffff0968d92 in QtWaylandClient::EventThread::readAndDispatchEvents()
() from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6WaylandClient.so.6
#24 0x00007ffff0961691 in QtWaylandClient::QWaylandDisplay::flushRequests() ()
from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6WaylandClient.so.6
#25 0x00007ffff2e1edd4 in QObject::event(QEvent*) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#26 0x00007ffff43a628f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Widgets.so.6
#27 0x00007ffff7b56376 in KisApplication::notify(QObject*, QEvent*) () from
/home/user/sources/krita/outputs/out/lib/libkritaui.so.21
#28 0x00007ffff2dbe6a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#29 0x00007ffff2dc1f19 in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#30 0x00007ffff30fc92f in postEventSourceDispatch(_GSource*, int (*)(void*),
void*) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#31 0x00007ffff230182b in g_main_context_dispatch_unlocked () from
/nix/store/f7rcazhd826xlcz43il4vafv28888cgj-glib-2.86.3/lib/libglib-2.0.so.0
#32 0x00007ffff2304e08 in g_main_context_iterate_unlocked.isra () from
/nix/store/f7rcazhd826xlcz43il4vafv28888cgj-glib-2.86.3/lib/libglib-2.0.so.0
#33 0x00007ffff23056af in g_main_context_iteration () from
/nix/store/f7rcazhd826xlcz43il4vafv28888cgj-glib-2.86.3/lib/libglib-2.0.so.0
#34 0x00007ffff30fc10d in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#35 0x00007ffff2dcc1eb in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#36 0x00007ffff2dc7599 in QCoreApplication::exec() () from
/nix/store/y12b5yjxvq0fwaskgjn2fl0q9v264w45-qtbase-6.10.1/lib/libQt6Core.so.6
#37 0x000055555555e11f in main ()
```

STEPS TO REPRODUCE
1. Open krita, create a new document
2. Try close the file, krita will ask if you want to save this file and where
to save the file. Save the file.

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Hyprland (color management impl probably different than KDE)
Qt Version: 6.10.1
krita version: master branch at 2025-01-22

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to