Bug 369191 - Crash if I use next/previous key frame quickly (back and forth) and draw at the same time
Summary: Crash if I use next/previous key frame quickly (back and forth) and draw at t...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 3.0.1
Platform: Microsoft Windows Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-22 12:25 UTC by portfolioval
Modified: 2016-10-17 12:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description portfolioval 2016-09-22 12:25:26 UTC
To flip in krita (same principle as in traditional animation https://youtu.be/JA7Naf0RF4M?t=59 ) I use the next and previous key frame shortcut quickly, but it always make krita crash. For some reason changing the shortcuts to shift + a letter resolved the problem temporarly, but now it crashes too, so I can't animate anymore on krita.

Reproducible: Always

Steps to Reproduce:
1.create at least two frames
2.create a shortcut for the next and previous key frame
3.use the next and previous key frame quickly and paint/draw at the same time
4.Until it crashes (matter of seconds)

Actual Results:  
Krita don't respond it crashes.

Expected Results:  
Not Crash

It crashes on two computers , one have version 3.0.1 the other 3.0
Comment 1 Halla Rempt 2016-09-26 11:41:24 UTC
What graphics cards are in those systems? And could you check the 3.0.2 alpha, too? 

http://download.kde.org/unstable/krita/3.0.1.89/
Comment 2 animtim 2016-09-26 12:08:31 UTC
I confirm I can somehow reproduce on linux, with intel graphics:
if I change frame while stylus is still drawing on the canvas, krita completely freeze.
Comment 3 Scott Petrovic 2016-09-28 01:52:34 UTC
I just got this crash pretty quickly on the latest windows build.  3.0.1.90

Followed the steps pretty much perfectly and it happened withing a second or two as soon as I started painting on the canvas.

For a graphics card, I have an NVIDIA GT650
Comment 4 portfolioval 2016-09-28 08:15:42 UTC
The desktop computer have a NVIDIA GeForce GTX 660 graphic card and the laptop have two graphic cards a Intel (R) HD Graphics 530  and a nvidia (I have to check again for the nvidia graphic to be more precise )

I've downloaded the alpha but I didn't undestand how to install it .
Comment 5 joupent 2016-09-28 10:38:00 UTC
I can't replicate the problem with the default shortcuts, but it does happen here with custom ones. 

Looking at it in a debugger, seems like the scheduler gets stuck in a loop at:
1	KisUpdateScheduler::barrierLock	kis_update_scheduler.cpp	335	0x7ffff3d37aec	
2	KisImage::barrierLock	kis_image.cc	411	0x7ffff3d47d98	
3	KisImageAnimationInterface::switchCurrentTimeAsync	kis_image_animation_interface.cpp	167	0x7ffff3d447d6	
4	QMetaObject::activate(QObject *, int, int, void * *)			0x7ffff6f2d35e	
5	KisImageAnimationInterface::sigInternalRequestTimeSwitch	moc_kis_image_animation_interface.cpp	247	0x7ffff3e5f3c1	
6	KisImageAnimationInterface::requestTimeSwitchNonGUI	kis_image_animation_interface.cpp	160	0x7ffff3d44525	
7	KisSwitchCurrentTimeCommand::redo	kis_switch_current_time_command.cpp	60	0x7ffff3cb3cf0	
8	KisImageAnimationInterface::requestTimeSwitchWithUndo	kis_image_animation_interface.cpp	144	0x7ffff3d44372	
9	AnimationDocker::slotNextFrame	animation_docker.cpp	390	0x7fffaf215fc5	
(...)
Comment 6 portfolioval 2016-09-29 09:29:32 UTC
OK so my laptop has a Nvidia GeForce GTX 950M (for applications I guess) and  Intel (R) HD Graphics 530  (for desktop If my understanding is good)
Comment 7 Dmitry Kazakov 2016-10-17 12:21:36 UTC
Git commit 7ade2d46b4c7e6411d0175c4cf8621c83b01a06e by Dmitry Kazakov.
Committed on 17/10/2016 at 12:21.
Pushed by dkazakov into branch 'master'.

Fix switching frames when painting at the same time

Fixes T3930

M  +1    -0    libs/image/CMakeLists.txt
M  +5    -5    libs/image/commands_new/kis_switch_current_time_command.cpp
M  +4    -2    libs/image/commands_new/kis_switch_current_time_command.h
M  +62   -34   libs/image/kis_image_animation_interface.cpp
M  +7    -4    libs/image/kis_image_animation_interface.h
A  +78   -0    libs/image/kis_switch_time_stroke_strategy.cpp     [License: GPL (v2+)]
A  +53   -0    libs/image/kis_switch_time_stroke_strategy.h     [License: GPL (v2+)]
M  +37   -0    libs/image/tests/kis_image_animation_interface_test.cpp
M  +1    -1    libs/image/tests/kis_image_animation_interface_test.h
M  +1    -1    plugins/dockers/animation/animation_docker.cpp
M  +1    -1    plugins/dockers/animation/kis_time_based_item_model.cpp
M  +1    -1    plugins/dockers/animation/tests/timeline_model_test.cpp
M  +1    -1    plugins/dockers/defaultdockers/kis_layer_box.cpp

http://commits.kde.org/krita/7ade2d46b4c7e6411d0175c4cf8621c83b01a06e
Comment 8 Dmitry Kazakov 2016-10-17 12:21:36 UTC
Git commit 4ae6ff72311d9b1a97f7e71f4a0adf0d1127064e by Dmitry Kazakov.
Committed on 17/10/2016 at 12:21.
Pushed by dkazakov into branch 'master'.

Make the frame switch stroke a barrier

Now the frame cannot switch until all the background strokes are
finished. Basically, we had this behavior from the very beginning,
though I wanted to get out of it, but it didn't work.

Fixes T3930

M  +3    -5    libs/image/kis_image_animation_interface.cpp
M  +9    -4    libs/image/kis_switch_time_stroke_strategy.cpp

http://commits.kde.org/krita/4ae6ff72311d9b1a97f7e71f4a0adf0d1127064e