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

            Bug ID: 460512
           Summary: Using specific color in 32-bit float image depth can
                    cause crash
    Classification: Applications
           Product: krita
           Version: 5.1.1
          Platform: Compiled Sources
                OS: Microsoft Windows
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Color models
          Assignee: krita-bugs-n...@kde.org
          Reporter: qamp...@hotmail.com
  Target Milestone: ---

SUMMARY
While working with 32-bit float image, a crash occurred when painting with
specific colors (Red at 1.0 value, including white with [1.0, 1.0, 1.0] value).
Something that I observed is that in float, canvas white and white from
advanced color selector only shows at [0.999..., 1.0, 0.999...], using a
specific color selector to bring it back to all 1.0 and painted it cause the
crash as well. However, the crash didn't occur at 16-bit float.

At first, I thought it was because I used Rec.2020 Profile, but when I tried
with sRGB and ACES, it also crashes. So does on different TRCs (Linear, sRGB)

A workaround is to disable 'Allow Little CMS optimizations' on Color Management
setting. From the crash logs, looks like the crashes has something to do with
lcms fast float module?

Another workaround that I discovered is using OCIO. However, if there are
pixels with those specific colors are on canvas, disabling OCIO will directly
result in crash as well.


STEPS TO REPRODUCE
1.  Create new canvas with 32-bit float depth
2.  Try to paint with pure white [1.0, 1.0, 1.0] from specific color selector
3. 

OBSERVED RESULT
Krita crashes

EXPECTED RESULT
Should be able to display the color properly

SOFTWARE/OS VERSIONS
Windows: 10 Pro 21H2 64bit
Qt Version: 5.12.12

ADDITIONAL INFORMATION

Krita Log:
SESSION: 16 Oct 2022 05:08:57 +0700. Executing C:\Program Files\Krita
(x64)\bin\krita.exe

Krita Version: 5.1.1, Qt version compiled: 5.12.12, loaded: 5.12.12. Process
ID: 37536
-- -- -- -- -- -- -- --
16 Oct 2022 05:08:57 +0700: Style: fusion. Available styles: windowsvista,
Windows, Fusion
16 Oct 2022 05:08:58 +0700: Database is up to date. Version: 0.0.17, created by
Krita 5.1.0, at Fri Aug 19 08:43:02 2022
16 Oct 2022 05:08:58 +0700: Could not load resource patterns/krita_AHSGKA.pat
16 Oct 2022 05:08:59 +0700: Non-store package - creating updater
16 Oct 2022 05:09:28 +0700: Created image "Unnamed", 1024 * 1024 pixels, 100
dpi. Color model: 32-bit float/channel RGB/Alpha (Rec2020-elle-V4-g10.icc).
Layers: 2
================================================================================

Krita Crash Log:
Error occurred on Sunday, October 16, 2022 at 05:09:50.

krita.exe caused an Access Violation at location 00007FF8A9D4C174 in module
liblcms2_fast_float.dll Reading from location 00000268D77B6B8C.

AddrPC           Params
00007FF8A9D4C174 0000240000000001 00000268D1509D40 00000268D2BA63B0 
liblcms2_fast_float.dll!FloatCLUTEval+0x6f4
00007FF8A9547CFB 0000000000000000 0000000000000001 0000000100000000 
liblcms2.dll!cmsDoTransform+0x4b
00007FF881747F5E 00007FF85F96E310 00000268D524E340 000000000000C430 
libkritapigment.dll!KoColorSpace::convertPixelsTo+0xae
00007FF82F8A0F6C 00000268E88DDCC4 00000268E88DDC58 00000268E88DDCB4 
kritalcmsengine.dll!KoColorSpaceAbstract<KoRgbF32Traits>::convertPixelsTo+0x4dc
00007FF8484003B5 00000268A3D90000 00000268D15BEC80 00000268B5411EA0 
libkritaui.dll!KisTextureTileUpdateInfo::convertTo+0x175
00007FF8483FF012 0000017F0000015D 00007FF8E0FD5BA1 00000268D0F83A19 
libkritaui.dll!KisOpenGLUpdateInfoBuilder::buildUpdateInfo+0x752
00007FF8483FE869 00000268D0F83A19 00000268B5411EA0 000000D1733FF6A8 
libkritaui.dll!KisOpenGLUpdateInfoBuilder::buildUpdateInfo+0x69
00007FF8483F8B10 00000268D1034E40 00000268D1033E80 00000268D1034E41 
libkritaui.dll!KisOpenGLImageTextures::updateCacheImpl+0x40
00007FF8483F6A9C 000000D1733FF810 00000268B5411EA0 000000D1733FF820 
libkritaui.dll!KisOpenGLImageTextures::updateCache+0x2c
00007FF84840BE9C 000000D1733FF8D0 00007FF8DE6FF05B 00000268B5411EA0 
libkritaui.dll!KisOpenGLCanvasRenderer::startUpdateCanvasProjection+0xcc
00007FF8483F48D5 00000268AC062F50 00007FF84963A0A9 00000268AC062F50 
libkritaui.dll!non-virtual thunk to
KisOpenGLCanvas2::startUpdateCanvasProjection(QRect const&)+0x15
00007FF8481B5392 00007FF85F971638 00000268AC062F50 0000000000000002 
libkritaui.dll!KisCanvas2::startUpdateCanvasProjection+0x22
00007FF849660868 00007FF84947E0A0 00007FF85F6D0EC5 00000268D0F0EF90 
Qt5Core.dll!QMetaObject::activate+0x828
00007FF85F4C7147 00000268D51F6970 00000268D51F6890 000000007FFFFFFF 
libkritaimage.dll!KisImage::sigImageUpdated+0x27
00007FF85F703646 00000268D1035360 00007FF849483364 0000000000007530 
libkritaimage.dll!KisImage::notifyProjectionUpdated+0xf6
00007FF85F4CE0C5 00000268B5571010 0000026800000000 0000000000000000 
libkritaimage.dll!KisUpdateJobItem::run+0xf5
00007FF84947FFAD 0000000000000000 0000000000000000 0000000000000000 
Qt5Core.dll!QThreadPoolThread::run+0xad
00007FF84947BE6C 0000000000000000 0000000000000000 0000000000000000 
Qt5Core.dll!QThreadPrivate::start+0x10c
00007FF8DF6B7034 0000000000000000 0000000000000000 0000000000000000 
KERNEL32.DLL!BaseThreadInitThunk+0x14
00007FF8E10026A1 0000000000000000 0000000000000000 0000000000000000 
ntdll.dll!RtlUserThreadStart+0x21

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

Reply via email to