Bug 486893 - Crashes when inserting keyframe columns when there's a transform mask.
Summary: Crashes when inserting keyframe columns when there's a transform mask.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2024-05-11 15:37 UTC by wolthera
Modified: 2024-06-03 17:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Malloc style crash. (8.23 KB, text/plain)
2024-05-11 15:37 UTC, wolthera
Details
Assert style crash. (4.33 KB, text/plain)
2024-05-11 15:38 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2024-05-11 15:37:53 UTC
Created attachment 169378 [details]
Malloc style crash.

SUMMARY
I was making a roundtable, when adding 

STEPS TO REPRODUCE
1. Have an animated transform mask applied to an animated layer
2. Try to insert keyframes left or right on the painted layer, where there's also a keyframe on the transform mask.
3. This will sometimes cause a malloc, and sometimes an assert.

SYSINFO:
Krita

 Version: 5.3.0-prealpha (git f133846)
 Hidpi: true

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 6.5.0-28-generic
  Pretty Productname: Ubuntu 20.04.6 LTS
  Product Type: ubuntu
  Product Version: 20.04
  Desktop: 
  Appimage build: No
Comment 1 wolthera 2024-05-11 15:38:15 UTC
Created attachment 169379 [details]
Assert style crash.
Comment 2 wolthera 2024-05-11 15:44:35 UTC
It does not happen with the old 5.2.2 appimage:

Krita

 Version: 5.2.2
 Hidpi: true

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 6.5.0-28-generic
  Pretty Productname: Ubuntu 23.10
  Product Type: ubuntu
  Product Version: 23.10
  Desktop: KDE
  Appimage build: Yes
Comment 3 wolthera 2024-05-12 12:36:13 UTC
Adding regression and release blocker tags, given animated transform mask refactor was backported to 5.2 already.
Comment 4 Dmitry Kazakov 2024-05-16 09:33:55 UTC
Hi, Wolthera!

Could you please share the file you have issues with? I cannot reproduce the issue here locally :(
Comment 5 wolthera 2024-05-20 09:52:44 UTC
I've sent the file to you by mail.

I seem to have made a small mistake in my description: It happens when you insert a keyframe column (thus on all visible layers), but it seems to be somewhat random when it happens, I just reproduced it when removing a keyframe...
Comment 6 Dmitry Kazakov 2024-06-03 17:33:51 UTC
Git commit 7541cfa30c29abc0c1050c6d3c3dab496995f572 by Dmitry Kazakov.
Committed on 03/06/2024 at 17:32.
Pushed by dkazakov into branch 'master'.

Fix crash when adding a column with a locked layer selected

1) Select a frame on a locked layer on the timeline
2) Press "Insert column"

The crash happened because calculateSelectionMetrics() would
return an infinitly wide inverted range. Now the patch added
an argument to ignore locked layers when it is necessary and
added a validity check in KisAnimTimelineFramesView::insertKeyframes()

M  +8    -6    plugins/dockers/animation/KisAnimTimelineFramesView.cpp
M  +1    -1    plugins/dockers/animation/KisAnimTimelineFramesView.h

https://invent.kde.org/graphics/krita/-/commit/7541cfa30c29abc0c1050c6d3c3dab496995f572
Comment 7 Dmitry Kazakov 2024-06-03 17:34:19 UTC
Git commit 9470e1a5173e725c6650d589dc807e628bd16043 by Dmitry Kazakov.
Committed on 03/06/2024 at 17:34.
Pushed by dkazakov into branch 'krita/5.2'.

Fix crash when adding a column with a locked layer selected

1) Select a frame on a locked layer on the timeline
2) Press "Insert column"

The crash happened because calculateSelectionMetrics() would
return an infinitly wide inverted range. Now the patch added
an argument to ignore locked layers when it is necessary and
added a validity check in KisAnimTimelineFramesView::insertKeyframes()

M  +8    -6    plugins/dockers/animation/KisAnimTimelineFramesView.cpp
M  +1    -1    plugins/dockers/animation/KisAnimTimelineFramesView.h

https://invent.kde.org/graphics/krita/-/commit/9470e1a5173e725c6650d589dc807e628bd16043