enitimeago / make-it-mmd

Non-destructive MMD blend shape tool
https://make-it-mmd.tmgo.dev/
MIT License
10 stars 5 forks source link

Error:NullReferenceException: Object reference not set to an instance of an object #53

Closed yelandiealma closed 5 months ago

yelandiealma commented 5 months ago
enitimeago commented 5 months ago

Thank you for the report!

I've received a similar report on Twitter: https://twitter.com/SsuroVRC/status/1768259546190114984

This appears to be triggered when more than one blendshape is selected for any MMD morph. I haven't been able to reproduce this with avatars I normally use.

Looking at the stack trace, the problem appears to be related to bones existing on the face's SkinnedMeshRenderer?

I need to find a repro case.

enitimeago commented 5 months ago

@yelandiealma May I ask what avatar you encountered this error with?

enitimeago commented 5 months ago

It seems like it's possible for a SkinnedMeshRenderer's bones to contain null, which was encountered by UniVRM too https://twitter.com/MobileHackerz/status/1280788469384536064 https://github.com/vrm-c/UniVRM/issues/467

I'll release a new alpha version with a patch for this.

enitimeago commented 5 months ago

@yelandiealma I've released 1.1.0-alpha.2, you can find the .unitypackage here or add my unstable VPM repository here.

Could you please try and let me know if it fixes the issue?

yelandiealma commented 5 months ago

oops, i went to sleep at that time, sorry. it work! thany you 🫶

enitimeago commented 5 months ago

Thank you for letting me know! If you have the time, could you let me know the avatar you encountered the error with, and whether the avatar's face mesh was modified (for example in Blender)? I'd like to find out how this error can be reproduced myself if possible.

yelandiealma commented 5 months ago

I use 右近弐式 with Face Tracking Module The strange thing is that when I reopened a new project and performed the same steps, the bug did not appear. My friend also triggered this bug, he uses Shinra, but his bug is triggered when selecting multiple blendshape in the same mmd expression, same as above. when he modified it from scratch, the error didn't appear either. so strange....

enitimeago commented 5 months ago

Ah great, I have Shinra, so I'll try doing some testing. If you can find out whether your friend also has modified Shinra's face mesh or has gimmicks that might modify the face mesh please let me know. Yeah, that's strange... thank you for the extra information!