Moho crashes while undo - Cause and Solution

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Moho crashes while undo - Cause and Solution

Post by Daxel »

I had the feeling that the crashes while undoing that people are reporting were related to Moho's autosave feature, so I decided to test that hypothesis.

The tests consisted on making a lot of diverse things like copy pasting keyframes, changing shape colors, moving points, creating shapes, moving all kind of bones, etc, and then undo and redo all those changes to see if Moho crashes. I ran 10 test in total: 5 with autosave on and 5 with autosave off. This was done with Moho 13.5.3 on Windows 10.

Each of the 5 "autosave on" tests ended in a crash, and not only that, but all of them with errors while tryin to recover the autosaved file (the classic "unable to parse from jason" or something similar).

I wasn't able to reproduce these crashes on any of the 5 "autosave off" test I ran. I hope this is not just a stupid coincidence (it happens) and my conclusion is that the autosave feature is buggy as it was in the past and all users should disable it. At least you should try it to see if it works for you. You can disable it at Edit - Settings - Documents.

You can find some nice scripts to make autosaving or incremental savings from the generous synthsin75 and davoodice2 using this forum's search bar.

Note for the devs: I thought that maybe some particular action was linked to the crashes, like breaking a shape deleting one of its points or something strange like that, so I ran the test only moving existing points with the magnet tool and then undoing but it crashed anyway, so it's probably not related to a particular action but it looks like any action will eventually cause a crash if you keep undoing them with autosave on.

Update: Moho's team released a new version today (13.5.4) that fixes this bug among others. I have updated to this new version and repeated the tests. After 6 minutes of stress testing the undo-redo system with autosave activated and styles used I wasn't able to crash the program. I'm too bored to continue.

Congratulations!
Last edited by Daxel on Thu Apr 28, 2022 12:20 am, edited 1 time in total.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Moho crashes while undo - Cause and Solution

Post by Greenlaw »

Just wondering, is there a number of undos that tends to crash Moho on your system? For example, 1-3, 4-8, 9-12, more?

Typically, I undo only a couple of steps and haven't tested Moho with a bunch of undos. Will see if I can make it crash here with a bunch of undos with Auto-save enabled.
User avatar
Víctor Paredes
Site Admin
Posts: 5665
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Moho crashes while undo - Cause and Solution

Post by Víctor Paredes »

Hi. Thanks for the information here.
Is your file using Styles? If not, could you share it with me?

Thanks again
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Moho crashes while undo - Cause and Solution

Post by Daxel »

Greenlaw wrote: Wed Apr 20, 2022 1:08 am Just wondering, is there a number of undos that tends to crash Moho on your system? For example, 1-3, 4-8, 9-12, more?

Typically, I undo only a couple of steps and haven't tested Moho with a bunch of undos. Will see if I can make it crash here with a bunch of undos with Auto-save enabled.

The number was quite random, but I would say it usually took more than 4 undos to crash, and in some of the tests I actually had to redo to keep undoing until it crashed. In one of the tests the crash happened while redoing. But with autosave off I tried undoing and redoing as much as I could as fast as I could and didn't manage to cause a single crash.


Víctor Paredes wrote: Wed Apr 20, 2022 7:54 am Hi. Thanks for the information here.
Is your file using Styles? If not, could you share it with me?

Thanks again

Yes, the file uses styles. The style panel was always undocked just in case.

I can't share this particular file but I thought that the crashes may be independent of the file used, so I created a new file to test it with a single vector shape and autosave on. I moved its points 15 times and started undoing and redoing for a long time, but I didn't manage to cause any crash. So my conclusion is that it is indeed dependent of the file used. I will keep running tests to see if I can narrow down the problematic element. So far I have tried adding a style to this latest test proyect but didn't make any difference so I suspect it could be the use of references, but maybe it's something more general like file size.
User avatar
Víctor Paredes
Site Admin
Posts: 5665
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Moho crashes while undo - Cause and Solution

Post by Víctor Paredes »

We are working on a fix for this. I hope we can have good news relatively soon.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Moho crashes while undo - Cause and Solution

Post by Daxel »

Víctor Paredes wrote: Wed Apr 20, 2022 12:00 pm We are working on a fix for this. I hope we can have good news relatively soon.
Great news!

I've made many tests but didn't find anything useful yet, other than the fact that it is not necessary to have a reference in the project to reproduce this undos + autosave crash. It's getting difficult to narrow down the problematic elements because it feels like the more things I delete in the project, the harder it becomes to reproduce the error so it takes more time to keep testing, minutes undoing and redoing until a crash.
User avatar
Víctor Paredes
Site Admin
Posts: 5665
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Moho crashes while undo - Cause and Solution

Post by Víctor Paredes »

So far, the issue seems to be on the Styles.
When Moho is auto-saving, it's creating a new copy of the file. The problem is that while that new copy is created, it's actually reading the styles from the original file (and it shouldn't), so if you undo while Moho is auto-saving, the connection between the file and the styles gets lost, the new auto-saved file is corrupted and the software crashes.
The crash is more evident and happens more often with bigger files, because Moho takes longer to create the copy, so the window to reproduce the crash is bigger.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Moho crashes while undo - Cause and Solution

Post by Daxel »

Víctor Paredes wrote: Wed Apr 20, 2022 3:07 pm So far, the issue seems to be on the Styles.
When Moho is auto-saving, it's creating a new copy of the file. The problem is that while that new copy is created, it's actually reading the styles from the original file (and it shouldn't), so if you undo while Moho is auto-saving, the connection between the file and the styles gets lost, the new auto-saved file is corrupted and the software crashes.
The crash is more evident and happens more often with bigger files, because Moho takes longer to create the copy, so the window to reproduce the crash is bigger.
Makes sense to me. File size seems to be a factor in my tests and maybe I didn't manage to crash the test on the simple project with a style created because it was too small.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Moho crashes while undo - Cause and Solution

Post by Greenlaw »

Ah, ok. Last night I tested making a bunch of undos, then redo-ing all that, and undo-ing it again without crashing, but I wasn't using custom Styles in the test project. It was a fairly simply character rig too. Tonight I'll try again with a more complex rig that uses custom Styles and see what happens.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Moho crashes while undo - Cause and Solution

Post by Daxel »

Update: Moho's team released a new version today (13.5.4) that fixes this bug among others. I have updated to this new version and repeated the tests. After 6 minutes of stress testing the undo-redo system with autosave activated and styles used I wasn't able to crash the program. I'm too bored to continue.

Congratulations!
Post Reply