"Assertion failed: imax >= 0"?

Assertion failed: imax >= 0 at line 444 of c:\buildslave\dev_sdk_win32\build\pan
Traceback (most recent call last):
  File "main.py", line 219, in <module>
  File "main.py", line 65, in loadModel
    actor = loadCustomFormat(filepath)
  File "C:\Users\User\loader.py", line 463, in lo
    bones.append(readBone(index, fileobject))
  File "C:\Users\User\loader.py", line 308, in readBone
AssertionError: imax >= 0 at line 444 of c:\buildslave\dev_sdk_win32\build\panda

This is an error I get when trying to load our in-house 3d format with joints, which had been previously exported from Blender. I don’t know where the issue might come from: our Blender exporter, or the panda3d loader. I have no idea what the error is saying, so any info is very appreciated. I’m guessing it has something to do with how the joint matrices are stored or how they are read.


It means it tried to invert a matrix and got something surprisingly noninvertible. Basically, I think it means you’ve got nonsense in the matrix you tried to invert.

It’s not something simple like a scale to zero (which is the way that most noninvertible matrices are accidentally constructed), because a scale to zero would have been detected earlier in the invert process. So it must be some other problem with the matrix that makes it noninvertible, and since I’ve never run into this assertion before, I suspect it’s something pretty unusual with the matrix.

Maybe the matrix is just incorrectly transposed or something like that.