Moho Bone Actions Bug

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
jayfaker
Posts: 151
Joined: Sat Feb 14, 2015 7:21 pm

Moho Bone Actions Bug

Post by jayfaker »

Hey guys, I'm experiencing a bug where when I enter an actions timeline, everything looks like it has disappeared, but there is a transform handle dot in the very center so I figure everything is scaled very small. For months, if I try to click and rotate, everything has popped back to normal, it gives me an error (see below), but I can keep working fine. But now, when I do it, a bunch of points in the artwork go all wonky, and when I try to move any, Moho crashes.

The error that pops up is (filepath)lm_transform_bone.lua:574: attempt to index a nil value

I'm pretty sure it's not just one corrupted project file as I've had this issue happen to me a lot, but it would be sad if I had to rebuild all my rigs also. Please let me know if there are any known solutions out there. I'm willing to upload an example file if necessary.

Thanks,

Jim
Last edited by jayfaker on Thu Apr 06, 2023 10:30 pm, edited 1 time in total.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Moho Bone Actions Bug

Post by Greenlaw »

This sounds very unusual to me. Have you tried disabling all third party scripts to see if any of them are causing this problem? To do this, just rename your Custom Content folder to something like 'Moho 13.5 Backup', launch Moho, and when it asks you about not having a Custom Content Folder, have Moho create a new one.

If the problem goes away, then you know the problem is related to at least one of your third party scripts. The the problem is still there, delete the new content folder and rename the backup to its original name.

From there, I'm not sure what could be the cause. Does this happen with every project (including stock projects) or only certain projects? If it's the former, it sounds like maybe something is corrupted with your Moho. If it's the later, find out which elements these projects share, and troubleshoot using copies of your project files.

Hope this helps.
User avatar
jayfaker
Posts: 151
Joined: Sat Feb 14, 2015 7:21 pm

Re: Moho Bone Actions Bug

Post by jayfaker »

I actually don't usually use custom scripts, though I've been meaning to start haha. And I just installed Moho fresh on this laptop I'm currently using. But the machine I started the projects on may have had a few.

This bug happens a lot to me, but it takes a while to start. So no, the stock projects that open with Moho don't do this, and projects that I'm just starting on don't do it either. It starts happening as I get further on in the rigging process, and by then I don't want to start over, ofc.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Moho Bone Actions Bug

Post by Greenlaw »

To me, it really sounds like some data shared by these files has gone bad. Things I would try...

Try systematically removing elements/layers from a project and saving a copy, closing, the reopening the file to test for the issue. If the issue goes away, then you know you have a bad asset in the project.

Depending on what the defective asset is, try opening it in the program that created it or a program that can edit the file, and resaving it as a new file. If the file is a video, try a different codec (IMO, unless you really need a video for some reason, it's almost always better and more efficient to use image sequences than a compressed video file.) If the file is audio, save it as an uncompressed .wav or .aif. .mp3 files are highly compressed and not suitable for animation reference.

If all your assets are fine, maybe there's a pesky negative keyframe present. I haven't heard of this error causing the problem you describe but may as well check. Use Synthsin75's Find and Delete Negative Keyframes script to easily fix this problem.

Although I haven't seen this issue myself, some users have reported reference layers going bad, so you might try recreating any reference layers you have.

After doing all of this, save your project as a new copy...or maybe better, import the project into a clean project and save that.

Hopefully any or all of the above steps will clean up your file for you.
User avatar
jayfaker
Posts: 151
Joined: Sat Feb 14, 2015 7:21 pm

Re: Moho Bone Actions Bug

Post by jayfaker »

Thanks Greenlaw! I'll try all these things.

I did try rebuilding the rig by copying and pasting all the points into new layers and then copying and pasting the bones into a new layer too. It turns out there were some layers that specifically were bad. Like you mentioned, those layers had keyframes on frame 0 that I couldn't seem to delete for some reason. I'll try to use Synthasin's script on those layers.

Either way, so far this new rig is working well. Maybe I also just need to be extra careful about keeping everything clean in the rig, and if issues pop up, to take care of them right away.

I'll keep you updated. Thanks again!

Jim
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Moho Bone Actions Bug

Post by Greenlaw »

jayfaker wrote: Fri Apr 07, 2023 1:13 am ...Like you mentioned, those layers had keyframes on frame 0 that I couldn't seem to delete for some reason. I'll try to use Synthasin's script on those layers.
Oh, that issue I have seen! 🙀

For those just joining, this is when a keyframe appears on frame 0 even when there are no other visible keyframes on that channel. I'm not sure what causes this problem but, yes, you want to fix it immediately when it appears.

Here's what I do when I see this problem...

First, I'll click on the channel's icon. This tells Moho to select all the keyframes in this channel. Then I'll press Delete. Normally, this will delete all the keyframes but if there is still a keyframe on frame 0, then you know you have corrupted data in that channel.

To fix this, try creating a keyframe on a later channel. I don't think this keyframe needs to have a different value, it just needs to be another keyframe. To be sure it's a valid keyframe, check that the value of the keyframe is what it's supposed to be. Now copy this keyframe to frame 0. Now select both keyframes (click the channel icon) and press delete. For me, most of the time, both keyframes will be deleted.

If that doesn't work, repeat the steps but instead of copy/pasting the keyframe to 0, try cutting/pasting the keyframe into frame 0, and then deleting it.

And if that doesn't work, try making the later keyframe a different value before copying or cutting it and pasting it into frame 0 and deleting it.

For me, the first method almost always works, and I don't think I've ever run into a situation where I couldn't fix it. If I did, then the next thing I'd probably try is to create a new layer and paste the shape into that layer. (Basically what you did.)

When repair is successful, remember to save the file

It's a rare bug but very annoying when it happens.

Just to be safe, I would also run Synthsin75's Find and Delete Negative Keyframes tool described earlier.

And remember, before troubleshooting a file, work with a copy of the project and not your only copy of the project. Working with only one copy of a project with no backup is just begging for trouble.
Last edited by Greenlaw on Fri Apr 07, 2023 11:20 pm, edited 2 times in total.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Moho Bone Actions Bug

Post by Daxel »

I have had this inmortal keyframe at F0 bug 2 or 3 times too. Sadly I don't remember what I did but I remember trying things, probably the same Greenlaw mentioned, and something worked so I didn't have to copy the artwork to another layer.
User avatar
jayfaker
Posts: 151
Joined: Sat Feb 14, 2015 7:21 pm

Re: Moho Bone Actions Bug

Post by jayfaker »

Greenlaw wrote: Fri Apr 07, 2023 5:26 pm
jayfaker wrote: Fri Apr 07, 2023 1:13 am ...Like you mentioned, those layers had keyframes on frame 0 that I couldn't seem to delete for some reason. I'll try to use Synthasin's script on those layers.
Oh, that issue I have seen! 🙀
I think I've figured this issue out! Whenever I can't delete the keyframes on frame 0, if I go to the sequencer and nudge the layer forward, I usually find keyframes on the frame before frame 0! If I delete those, then the keyframes on frame zero delete as well!

-Jim
Post Reply