Bug 414668 - Crash with onion skins when using opacity keyframe on a layer with non-animated content
Summary: Crash with onion skins when using opacity keyframe on a layer with non-animat...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-29 20:46 UTC by Ahab Greybeard
Modified: 2019-12-11 12:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example .kra file to induce the crash (138.29 KB, application/binary)
2019-11-29 20:46 UTC, Ahab Greybeard
Details
Windows crash log (17.46 KB, text/x-log)
2019-11-29 20:47 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2019-11-29 20:46:48 UTC
Created attachment 124189 [details]
Example .kra file to induce the crash

SUMMARY
This happens with the latest 4.3.0 prealpha Windows build g5924da4972 and also the 4.2.8 Linux appimage.

STEPS TO REPRODUCE
1. Put opacity keyframes on a layer which is not itself animated. This may be done to give some kind of fade in/out effect for the layer content.
2. Click on the onion skin icon for that layer in the Timeline docker.

A .kra file is attached that illustrates this.

OBSERVED RESULT
Crash

I attach the Windows crash log.

EXPECTED RESULT
Not crash

I know that there's no point in trying to show onion skins for this situation but if it can be done them somebody will try to do it (like I did).
A workaround is to make one animated frame by using Create Duplicate Frame on frame-0 of the Timeline so it fills up with held frames of the layer content. However, this can't be done if an opacity keyframe has been placed on frame-0.

SOFTWARE/OS VERSIONS

Krita

 Version: 4.2.8
 Languages: en_GB, en
 Hidpi: true

Qt

  Version (compiled): 5.12.5
  Version (loaded): 5.12.5

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-6-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 418.74" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 0, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: none
  Memory: 16039 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

	Current Swap Location: /tmp
	Undo Enabled: 1
	Undo Stack Limit: 18
	Use OpenGL: 0
	Use OpenGL Texture Buffer: 1
	Use AMD Vectorization Workaround: 0
	Canvas State: OPENGL_SUCCESS
	Autosave Interval: 360
	Use Backup Files: 1
	Number of Backups Kept: 1
	Backup File Suffix: ~
	Backup Location: Same Folder as the File
	Use Win8 Pointer Input: 0
	Use RightMiddleTabletButton Workaround: 0
	Levels of Detail Enabled: 0
	Use Zip64: 0


ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2019-11-29 20:47:34 UTC
Created attachment 124190 [details]
Windows crash log
Comment 2 Tiar 2019-12-02 19:58:49 UTC
Git commit 089a28f96c0d99921496205c545719c03ea004ad by Agata Cacko.
Committed on 02/12/2019 at 19:30.
Pushed by tymond into branch 'master'.

Fix crash using onion skins on non-animated layers

Using onion skins on layers without any content keyframes
is possible if one is using opacity keyframes.
Before this commit, turning onion skins on would cause a crash.
After this commit, turning onion skins on will do nothing.

M  +10   -0    libs/image/kis_onion_skin_compositor.cpp

https://invent.kde.org/kde/krita/commit/089a28f96c0d99921496205c545719c03ea004ad
Comment 3 Ahab Greybeard 2019-12-03 11:46:29 UTC
This also seems to have fixed the crash situation reported in https://bugs.kde.org/show_bug.cgi?id=414734 as tested with the single example .kra file provided by the OP for the bug.
Comment 4 Tiar 2019-12-11 12:51:34 UTC
Git commit c286e04954e6c4ce4d8a15dafa520f9a16d0f041 by Agata Cacko.
Committed on 11/12/2019 at 12:48.
Pushed by tymond into branch 'krita/4.2'.

Fix crash using onion skins on non-animated layers

Using onion skins on layers without any content keyframes
is possible if one is using opacity keyframes.
Before this commit, turning onion skins on would cause a crash.
After this commit, turning onion skins on will do nothing.

M  +10   -0    libs/image/kis_onion_skin_compositor.cpp

https://invent.kde.org/kde/krita/commit/c286e04954e6c4ce4d8a15dafa520f9a16d0f041