Bug 478307

Summary: Segfault on opening grayscale WebP
Product: [Applications] krita Reporter: t_w_
Component: File formatsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: penguinflyer2222
Priority: NOR    
Version: 5.2.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Grayscale WebP created with Krita

Description t_w_ 2023-12-09 15:22:51 UTC
Created attachment 164041 [details]
Grayscale WebP created with Krita

Trying to open a grayscale WebP as produced with either Krita or GIMP results in a segfault.

Maybe related: https://bugs.kde.org/show_bug.cgi?id=216110
Comment 1 Freya Lupen 2023-12-09 15:31:57 UTC
Confirmed, here's the crash backtrace:
> 0   libkritapigment.20.0.0.dylib  	       0x107cd370c KoColorSpaceRegistry::permanentColorspace(KoColorSpace const*) + 20 (KoColorSpaceRegistry.cpp:839)
> 1   libkritapigment.20.0.0.dylib  	       0x107c97660 KoColor::KoColor(QColor const&, KoColorSpace const*) + 24 (KoColor.cpp:93) [inlined]
> 2   libkritapigment.20.0.0.dylib  	       0x107c97660 KoColor::KoColor(QColor const&, KoColorSpace const*) + 52 (KoColor.cpp:90)
> 3   kritawebpimport.so            	       0x16b69ee74 KisWebPImport::convert(KisDocument*, QIODevice*, KisPinnedSharedPtr<KisPropertiesConfiguration>) + 980 (kis_webp_import.cpp:96)
Comment 2 wolthera 2023-12-12 12:55:57 UTC
Git commit 1fc417ae3e591142ef8b4f0531368b251dafac9b by Wolthera van Hövell, on behalf of Rasyuqa A. H..
Committed on 12/12/2023 at 13:55.
Pushed by woltherav into branch 'master'.

WebP: properly assign profile when importing image with non-RGBA model

M  +30   -1    plugins/impex/webp/kis_webp_import.cpp

https://invent.kde.org/graphics/krita/-/commit/1fc417ae3e591142ef8b4f0531368b251dafac9b
Comment 3 wolthera 2023-12-12 12:57:36 UTC
Git commit 24c985bda8957da9a817274d0af65db7e4f3e47c by Wolthera van Hövell tot Westerflier, on behalf of Rasyuqa A. H..
Committed on 12/12/2023 at 13:57.
Pushed by woltherav into branch 'krita/5.2'.

WebP: properly assign profile when importing image with non-RGBA model

M  +30   -1    plugins/impex/webp/kis_webp_import.cpp

https://invent.kde.org/graphics/krita/-/commit/24c985bda8957da9a817274d0af65db7e4f3e47c