When I play the following particle effect using DirectX, Panda3D crashes. I can successfully reproduce it on the Roaming Ralph example. This issue does not happen when using OpenGL.
Hi @Maxwell175! Could you file this as an issue on the issue tracker, and post all the code needed to reproduce it? Then we can look into fixing this issue.
I can confirm the fix works perfectly! Thanks a bunch!
However, I have gotten a report from one of the testers of the following error:
:display:gsg:dxgsg9(error): CreateVertexBuffer failed at (panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx:503), hr=D3DERR_INVALIDCALL: Invalid call
:display:gsg:dxgsg9(error): CreateVertexBuffer failed at (panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx:503), hr=D3DERR_INVALIDCALL: Invalid call
:display:gsg:dxgsg9(error): CreateVertexBuffer failed at (panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx:503), hr=D3DERR_INVALIDCALL: Invalid call
Assertion failed: _contexts == nullptr at line 299 of panda/src/gobj/geomVertexArrayData.cxx
Nobody else had this error, and even this person only had this crash once after a while of testing and could not reproduce it. Is it possible this error could be caused by low graphics memory? On the surface it doesn’t seem so.
Hmm, a little troubling. It’s not clear to me why this error would occur. I think it would fail with a different error if it were a memory allocation error. Is this happening with particle effects again?
Before I start, let me note that I don’t know enough about DirectX or that specific error to be confident in the following; thus take this with much salt.
That said, the fact that the issue happened intermittently, and after some time had passed with the game running, and seemed related to changing zones, suggests to me the possibility that it might be a cleanup issue: either a memory leak, or loading resources before cleaning up the old ones.