Bug or pythons exts conflict...

Hello, i’am totaly new in Panda3D, but not newbe in programming and 3d engines.
And here is my story (step by step):
intro: Vista Home Basic SP1, no python installed, Netbeans 6.x used (panda python platform setuped)

  1. Download and install Panda3D 1.6.2, to path g:\SDK\Panda3D-1.6.2
  2. Download and install Sqlite Python addon (from here pysqlite)
  3. Download and install elementtree
  4. Create cell.egg from 3ds max (download it here)
  5. Make simple scene:
import direct.directbase.DirectStart
for x in range(-4,4):
    for y in range(-4,4):
        cell = loader.loadModel("data/models/cell")
        cell.reparentTo(render)
        cell.setScale(0.05,0.05,0.05)
        cell.setPos((x*100.0 + 50.0)*0.05,(y*100.0 + 50.0)*0.05,0.0)
run()
  1. All good, cells apears, camera moving, everything cool… but if i tried press any keyboard key… Panda end with weird error (not always(!), but often):
DirectStart: Starting the game.
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Traceback (most recent call last):
  File "G:\SDK\Panda3D-1.5.4\direct\showbase\ShowBase.py", line 1512, in __resetPrevTransform
    PandaNode.resetAllPrevTransform()
AssertionError: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
:task(error): Exception occurred in PythonTask resetPrevTransform
Traceback (most recent call last):
  File "G:\Projects\PinkQuest\src\main.py", line 28, in <module>
    run()
  File "G:\SDK\Panda3D-1.5.4\direct\showbase\ShowBase.py", line 2423, in run
    self.taskMgr.run()
  File "G:\SDK\Panda3D-1.5.4\direct\task\TaskNew.py", line 471, in run
    self.step()
  File "G:\SDK\Panda3D-1.5.4\direct\task\TaskNew.py", line 429, in step
    self.mgr.poll()
  File "G:\SDK\Panda3D-1.5.4\direct\showbase\ShowBase.py", line 1512, in __resetPrevTransform
    PandaNode.resetAllPrevTransform()
AssertionError: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Error in sys.exitfunc:
Traceback (most recent call last):
  File "G:\SDK\Panda3D-1.5.4\direct\showbase\ShowBase.py", line 450, in exitfunc
    self.destroy()
  File "G:\SDK\Panda3D-1.5.4\direct\showbase\ShowBase.py", line 431, in destroy
    self.graphicsEngine.removeAllWindows()
AssertionError: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx

All demos can (!) be die with this errors. Any suggestions?
P.S. Sorry for my poor english.

  1. [b]G:\SDK\Panda3D-1.5.4[/b]???

Did you uninstall your previous panda version?

Probably there is a conflict with your panda installations.

  1. Why do you need pySQLLite,Element Tree?

Panda has everything needed already packed!

  1. Your traceback tells about an exception in transform-s.

This might be the model’s problem.

  1. Try opening your game directly(not from netbeans)

  2. Delete all panda3D 1.5.4/1.6.0/1.6.1 files and reinstall P3D 1.6.2

  3. Try using other models.

  4. Do panda’s samples make the same error?

And yes, for moving an object around please use panda’s Task system, since it’s been made for that and AFAIK it’s much better optimized for this.

  1. Ok. i’ll try uninstal and clean folder, then install panda again.
  2. Any model crushed my panda.
  3. I think not.
  4. Ok
  5. Any model crushed my panda.
  6. Yes

, yes, i know, but writed above code not using any motions… no tasks, no transformations, except of cource scale and translation…

ok, now, panda uninstalled, folder clean, system rebooted. and installed new panda3d-1.6.2…

  1. run “NormalMapping” example, everything ok (in older panda installation sometimes it crushed)
  2. run “DiscoLight” example, everyhing ok too (goood)
  3. run my short script from netbeans… crushed (move mouse with any mouse button pressed, then press any keyboard button → crush)
  4. run my short script directly from cmd by “python.exe main.py” it crushed again…
  5. ok, replace data/models/cell.egg by other my model… crushed
  6. (wtf…), ok, replace my model by something from panda’s model (converted into *.pz)…crushed…
  7. and then, i just comment ONE line in my code
#cell.setPos((x*100.0 + 50.0)*0.05,(y*100.0 + 50.0)*0.05,0.0)

no crushes, with anything models… if i used just cell.setPos(1,2,3), it’s works ( :open_mouth: )…the problem in x,y… ok, the detective story just begin…

how to setup initial model position? (yep static, and not animatable anytime) without this error?
[/quote]

for code:

# -*- coding: UTF-8 -*- 
import direct.directbase.DirectStart
for x in xrange(-4,4):
    for y in xrange(-4,4):
        cell = loader.loadModel("data/models/planet_sphere")
        cell.setScale(0.5,0.5,0.5)
        cell.setPos((x*50.0+25.0),(y*50.0+25.0),0)
        #cell.setPos(1,2,3) # WTF?? no crushes with...
        cell.reparentTo(render)
run()

next error log:

DirectStart: Starting the game.
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
Assertion failed: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Assertion failed: _saved_entry == _states->end() at line 108 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
Traceback (most recent call last):
  File "G:\SDK\Panda3D-1.6.2\direct\showbase\ShowBase.py", line 1512, in __resetPrevTransform
    PandaNode.resetAllPrevTransform()
AssertionError: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx
:task(error): Exception occurred in PythonTask resetPrevTransform
Traceback (most recent call last):
  File "G:\Projects\PinkQuest\src\main.py", line 29, in <module>
    run()
  File "G:\SDK\Panda3D-1.6.2\direct\showbase\ShowBase.py", line 2423, in run
    self.taskMgr.run()
  File "G:\SDK\Panda3D-1.6.2\direct\task\TaskNew.py", line 471, in run
    self.step()
  File "G:\SDK\Panda3D-1.6.2\direct\task\TaskNew.py", line 429, in step
    self.mgr.poll()
  File "G:\SDK\Panda3D-1.6.2\direct\showbase\ShowBase.py", line 1512, in __resetPrevTransform
    PandaNode.resetAllPrevTransform()
AssertionError: _states->find(this) == _saved_entry at line 1951 of c:\p\p3d\panda3d-1.6.2\panda\src\pgraph\transformState.cxx

and the detective continues:
using “Tut-asteroids.py”
in the line #89, comment code -> #base.disableMouse()
wow, and this tutorial crushes too!