Did not have this problem with previous installment

when I try to run my main.py (that worked in the previous installment of panda3d) it crashes.

The last words of the terminal b4 it died were:

:linmath(warning): Tried to invert singular LMatrix3.
Assertion failed: Attempt to compute inverse of singular matrix! at line 1514 of
 c:\p\p3d\panda3d-1.6.2\built\include\lmatrix4_src.I
:linmath(warning): Tried to invert singular LMatrix3.
Assertion failed: Attempt to compute inverse of singular matrix! at line 1514 of
 c:\p\p3d\panda3d-1.6.2\built\include\lmatrix4_src.I
Assertion failed: length_sq != 0.0f at line 180 of c:\p\p3d\panda3d-1.6.2\panda\
src\linmath\lmatrix4_src.cxx
Assertion failed: Attempt to compute inverse of singular matrix! at line 1514 of
 c:\p\p3d\panda3d-1.6.2\built\include\lmatrix4_src.I

(R.I.P.)

script ran fine in previous installment so I presume its a panda problem
or something changed in panda so I would need to adjust my script

It’s basically a divide-by-zero error. This is often caused by having a scale-to-zero in the scene graph somewhere.

A lot of times, people make this mistake in their 2-d GUI: they set an object with scale = (0.5, 0, 0.2) or something like that, which is a zero scale in the Y axis. It’s better to do (0.5, 1, 0.2).

David

Got it, THX!
Back to the txt editor!

still having problems, this is the only scaling on a model I did:

self.PlayerMesh.setPosHprScale(self.player_X, self.player_Y, self.player_Z, 90, 0, 0, 0.01, 0.01, 0.01)

Try something like this:

for np in render.findAllMatches('**') + render2d.findAllMatches('**'):
  if np.getTransform().isSingular():
    print np

See if it prints any NodePaths.

You might need to run your code interactively so you can do this in the Python debugger after you get the assertion failure.

David

how do you do that? I only open my dos window and run the code by going to my dir and typing “python.exe main.py”

This might sound very noob’ish :blush:

Type “python -i main.py” instead. When the assertion happens, it will return you to the Python prompt, and you can type this code then.

David

I’m afread it doesnt, when I type that into the cmd it just reports the error and returns to the normal status where I am supposed to type in the “python -i main.py” line

Hmm I’m definatly doing something wrong

SOLUTION

I knew there was something else. The use of a collada model was the cause, when I changed it back to a .X file it ran! Thx anyways