Bug 455077

Summary: Height to normal crashes krita
Product: [Applications] krita Reporter: Mmero <dragonuppl>
Component: FiltersAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: crash CC: halla
Priority: NOR    
Version First Reported In: 5.0.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: KritaCrashLogs

Description Mmero 2022-06-09 12:10:21 UTC
SUMMARY

STEPS TO REPRODUCE
1.  add any texture
2.  separate image
3.  use "height to normal map" on one of the layers

OBSERVED RESULT
crash every time
Comment 1 Halla Rempt 2022-06-09 12:33:10 UTC
Could you check whether you have a kritacrash.log in %APPDATA% and if so, attach it here?
Comment 2 Mmero 2022-06-10 08:43:20 UTC
Created attachment 149593 [details]
KritaCrashLogs

KritaCrashLogs
Comment 3 Halla Rempt 2022-06-10 09:32:14 UTC
Are you by any chance working on a grayscale layer? I can reproduce the crash with that, but not with an RGB layer.
Comment 4 Halla Rempt 2022-06-10 10:52:55 UTC
Git commit 55f4df14e1f12ea7cc1214783685ee74a37cace1 by Halla Rempt.
Committed on 10/06/2022 at 10:45.
Pushed by rempt into branch 'master'.

Don't run height-to-normal map if there aren't enough channels

M  +7    -0    plugins/filters/convertheightnormalmap/kis_convert_height_to_normal_map_filter.cpp

https://invent.kde.org/graphics/krita/commit/55f4df14e1f12ea7cc1214783685ee74a37cace1
Comment 5 Halla Rempt 2022-06-10 10:53:19 UTC
Git commit e429092969f5c28f68fee4c7ed47551b143204e4 by Halla Rempt.
Committed on 10/06/2022 at 10:53.
Pushed by rempt into branch 'krita/5.1'.

Don't run height-to-normal map if there aren't enough channels
(cherry picked from commit 55f4df14e1f12ea7cc1214783685ee74a37cace1)

M  +7    -0    plugins/filters/convertheightnormalmap/kis_convert_height_to_normal_map_filter.cpp

https://invent.kde.org/graphics/krita/commit/e429092969f5c28f68fee4c7ed47551b143204e4
Comment 6 Mmero 2022-06-10 14:51:21 UTC
(In reply to Halla Rempt from comment #5)
> Git commit e429092969f5c28f68fee4c7ed47551b143204e4 by Halla Rempt.
> Committed on 10/06/2022 at 10:53.
> Pushed by rempt into branch 'krita/5.1'.
> 
> Don't run height-to-normal map if there aren't enough channels
> (cherry picked from commit 55f4df14e1f12ea7cc1214783685ee74a37cace1)
> 
> M  +7    -0   
> plugins/filters/convertheightnormalmap/
> kis_convert_height_to_normal_map_filter.cpp
> 
> https://invent.kde.org/graphics/krita/commit/
> e429092969f5c28f68fee4c7ed47551b143204e4

For the Future It would be nice to be able to run that filter with GreyScale texture
not only "separate image" creates greyscale layers but heightmaps itself are GreyScale in nature so it's kinda funny that "height to normal map" won't accept height maps as input.