Bug 432825

Summary: Animated Transform Mask: "Reset all channels" on an Opacity channel may cause a crash.
Product: [Applications] krita Reporter: Emmet O'Neill <emmetoneill.pdx>
Component: AnimationAssignee: Emmet O'Neill <emmetoneill.pdx>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Emmet O'Neill 2021-02-12 01:14:37 UTC
SUMMARY

"Reset all channels" on an Opacity channel may cause a crash.

STEPS TO REPRODUCE:

1. Set non-animated layer opacity to 30%

2. Create an opacity channel and make it variable, say, from 100% to 0%

3. Select some frame in the middle that the layer opacity becomes something like  60% (not initial 30%, that is important)

4. Reset opacity channel

5. Bug 2.1: The opacity slider in layer box still shows 60%, but after changing the current time it flips back to the original 30%

6. Create a few opacity keyframes and remove them

7. Bug 2.2: Try changing opacity using the slider in the layer box, see the crash
Comment 1 Emmet O'Neill 2021-02-12 01:16:31 UTC
Backtrace paste: https://pastebin.com/NENbXMiz
Comment 2 Eoin O'Neill 2021-02-23 01:53:28 UTC
Git commit 426f285c1364d7d37d88123f64827491c3493654 by Eoin O'Neill.
Committed on 23/02/2021 at 00:15.
Pushed by eoinoneill into branch 'master'.

Improvements to animated opacity channel behavior.

Should fix resetting and removing opacity keys so that opacity
slider reflects the appropriate current value.

M  +15   -2    libs/image/KisAnimatedOpacityProperty.cpp
M  +2    -1    libs/image/KisAnimatedOpacityProperty.h

https://invent.kde.org/graphics/krita/commit/426f285c1364d7d37d88123f64827491c3493654
Comment 3 Eoin O'Neill 2021-02-23 01:53:37 UTC
Git commit 928801de6bd02e5964f2326dbb405a92f050ce82 by Eoin O'Neill.
Committed on 22/02/2021 at 21:57.
Pushed by eoinoneill into branch 'master'.

Fix crash caused by missing opacity key data due to channel reset or keyframe removal.

M  +1    -1    libs/image/KisAnimatedOpacityProperty.cpp

https://invent.kde.org/graphics/krita/commit/928801de6bd02e5964f2326dbb405a92f050ce82