Bug 411045 - Converting image to XYZ color space triggers assert
Summary: Converting image to XYZ color space triggers assert
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color models (show other bugs)
Version: 4.2.5
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-18 20:34 UTC by Lynx3d
Modified: 2019-09-14 15:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Full backtrace of recent (23. august 2019) master branch build (20.92 KB, text/plain)
2019-08-26 13:38 UTC, Lynx3d
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lynx3d 2019-08-18 20:34:55 UTC
SUMMARY
When trying to convert an image to XYZ color space (tried 8-bit integer, 16-bit integer, 16-bit float), krita crashes.

STEPS TO REPRODUCE
1. Open/create any document with the usual 8-bit/channel RGB color space
2. Go to "Image"->"Convert Image to Color Space..." and select "XYZ/Alpha"
   (other settings don't seem to matter, not even color depth)
3. Click "OK"

OBSERVED RESULT
Krita quits with console message:
ASSERT (krita): "m_textureTiles.size() > tile" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/ui/opengl/kis_opengl_image_textures.h, line 134

EXPECTED RESULT
Get the image converted to XYZ color space


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 18.04
(available in About System)
KDE Plasma Version: 5.12.8
KDE Frameworks Version: 
Qt Version: 5.12.4

ADDITIONAL INFORMATION
It also happens on self-compiled git master with Qt 5.9.5
Video card/drivers:
Renderer:  "GeForce GTX 960/PCIe/SSE2" 
Version:  "4.6.0 NVIDIA 430.26"
Comment 1 Lynx3d 2019-08-21 23:55:18 UTC
I think I just figured out the reason, the color space itself doesn't seem to be the actual issue, but having OpenColorIO active with the OCIO Color Engine selected in the LUT Management seems to cause the crash.
It then also happens with other color spaces (CMYK, L*a*b) too, although I could've sworn it only happened with XYZ when I reported this.
Comment 2 Lynx3d 2019-08-26 13:38:18 UTC
Created attachment 122368 [details]
Full backtrace of recent (23. august 2019) master branch build
Comment 3 Halla Rempt 2019-08-27 12:25:30 UTC
I can confirm the issue.
Comment 4 Dmitry Kazakov 2019-09-14 15:06:06 UTC
Git commit ccc25f2e56666fd0167740a8361f83404b06b8da by Dmitry Kazakov.
Committed on 14/09/2019 at 14:52.
Pushed by dkazakov into branch 'master'.

Fix crash when converting color space with OCIO enabled

The crash happened because of recursive entrance into
KisOpenGLImageTextures when a message box was opened. This
patch removes a message box and adds nitification with a floating
message.

M  +9    -0    libs/ui/opengl/kis_opengl_canvas2.cpp
M  +3    -0    libs/ui/opengl/kis_opengl_canvas2.h
M  +5    -6    libs/ui/opengl/kis_opengl_image_textures.cpp
M  +6    -1    libs/ui/opengl/kis_opengl_image_textures.h

https://invent.kde.org/kde/krita/commit/ccc25f2e56666fd0167740a8361f83404b06b8da
Comment 5 Dmitry Kazakov 2019-09-14 15:19:53 UTC
Git commit 55ffd724aeef07a5a8ecce7818e0190d27345f8f by Dmitry Kazakov.
Committed on 14/09/2019 at 15:08.
Pushed by dkazakov into branch 'krita/4.2'.

Fix crash when converting color space with OCIO enabled

The crash happened because of recursive entrance into
KisOpenGLImageTextures when a message box was opened. This
patch removes a message box and adds nitification with a floating
message.

M  +9    -0    libs/ui/opengl/kis_opengl_canvas2.cpp
M  +3    -0    libs/ui/opengl/kis_opengl_canvas2.h
M  +5    -6    libs/ui/opengl/kis_opengl_image_textures.cpp
M  +6    -1    libs/ui/opengl/kis_opengl_image_textures.h

https://invent.kde.org/kde/krita/commit/55ffd724aeef07a5a8ecce7818e0190d27345f8f