Bug 426424 - Assert when undoing/redoing assistant changes too fast
Summary: Assert when undoing/redoing assistant changes too fast
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Assistants (show other bugs)
Version: 4.3.0
Platform: Other Other
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-11 20:28 UTC by Dmitry Kazakov
Modified: 2021-08-02 10:34 UTC (History)
1 user (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 Dmitry Kazakov 2020-09-11 20:28:56 UTC
STEPS TO REPRODUCE
1. Create 2 Vanishing point assistants
2. Modify them a lot to generate about 10 undo steps
3. Open Undo History docker
4. Click and hold mouse button on any undo step and start dragging back and forth.

OBSERVED RESULT

ASSERT (krita): "newAssistants.size() < oldAssistants.size()" in file C:/dev/env-3/krita/plugins/assistants/Assistants/EditAssistantsCommand.cpp, line 61
Comment 1 Ahab Greybeard 2020-09-14 18:47:06 UTC
I can't reproduce this with the 4.3.0 appimage on Debian 10 or the 4.3.0 portable .zip on Windows 10.
Canvas content changes smoothly as mouse is dragged and nothing in the log.
Comment 2 Dmitry Kazakov 2020-09-24 12:57:36 UTC
Here is a video with the official Krita 4.4.0 Beta1 package: 
https://yadi.sk/i/xh2ytE-_1Hux0w
Comment 3 Ahab Greybeard 2020-09-24 14:08:43 UTC
I can now reproduce this with the 4.4.0-beta1 appimage.

It does not depend on the image size.
It does not depend on how many changes are in the Undo History docker.
You can do it with just one vanishing point.

The method is to manipulate the handles on the control lines so that the vanishing point is pushed off the canvas out to 'infinity' and then comes back from the other side of 'infinity'.
If that is done then a crash will happen with rapid wiping of the Undo History:

Terminal output:
ASSERT (krita): "newAssistants.size() > oldAssistants.size()" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/plugins/assistants/Assistants/EditAssistantsCommand.cpp, line 59
Aborted
Comment 4 Ahab Greybeard 2020-10-03 13:07:00 UTC
Testing with the 4.4.0-beta2 appimage, there is the same crash with one ellipse assistant.
You can manipulate the control handles so that the ellipse goes off to infinity and the control handles are visible but the ellipse is not.
Leave it there and then manipulate control handles to bring it back from infinity.

Again, a crash with rapid wiping of the undo history:

ASSERT (krita): "newAssistants.size() < oldAssistants.size()" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/plugins/assistants/Assistants/EditAssistantsCommand.cpp, line 61
Aborted
Comment 5 Dmitry Kazakov 2021-08-02 10:34:35 UTC
It looks like the bug is fixed in Krita 5.0. I cannot reproduce it anymore.