Invalid Vertex Weights, *NEED STEPS TO REDO*
Closed, ResolvedPublic


The following file breaks crashes 64 bit builds.

32 XP - Works
32 Linux - Works
64 win 7 with 32 bit build - Works
64 win 7 with 64 bit build - Crash (This happened on multiple different machines)

I don't have a 64 bit linux install available to test, so I can't provide additional info there.



fix coming up, need to do some more investigation before committing.

This file crashes because some of the indices's for the weights are set to -1. It can be checked for in 1 place to fix the crash but really it would need to be checked all over.

from looking in the code this should never be possible, I've added some asserts to give warnings if it ever does, but still not sure how you managed this.

Could you find how this error happened (what steps to follow)? - otherwise this could be a corrupt file from bad memory, bad disk etc - which we cant support.

Campbell, It is not actually my file - it was a submission for theBlu. I'll contact the artist and encourage him to give more information here on what he did. Maybe we can track this issue down. Is there a reason it only crashes in 64 bit builds? I would think with the issue you describe that it would crash all builds.

This should crash on all systems, sometimes invalid operations don't crash depending on the configuration.

was this imported with an fbx importer? - do you have any idea how it was created?

I've committed a fix of sorts - r42508, the python function mesh.validate() now corrects this case - heres how to repair the file even on a system which crashes.

* Append the scene of the blend file into a new blend
* Run this in the python console
* "for me in me.validate(True)"
* Now switch to the scene and it wont crash

note that the errors are printed in the terminal, it may give you some hint as to whats going on.

closing this report, can re-open if you find steps to make this invalid data.

Thanks for the fix. There is a wip thread that the artist made on this fish that might glean some information. I think they were using all blend files but I'm not sure if the rig was originally a maya rig converted via fbx for a template. I'll talk with the Wemo guys and get back to you.

Wip Thread:

Hi again, think I know how this might have been caused, we missed some checks for buffer length and in some places weight painting could write into invalid regions of memory, I went over and checked every place where
MDeformWeight.def_nr was used in array access and skip weights which are out of range.


since there wasn't an obvious cause for this and the code had so many checks missing, marking this as fixed.