setSystemGrowsOlderFlag crash

I’m trying to create a “splash” particle system but setSystemGrowsOlderFlag(1) causes panda 1.6.2 to crash (including on the particle editor)
Does anyone know why?

Someone else a few threads back noticed the particle system in general needs some fresh TLC. The growsOlder flag was a particular issue. There may be other homebrew particle systems you can find on the forums if you don’t want to make your own (just throw a bunch of transparent flats and write your own physics).

Can you give me a short piece of sample code that crashes? Preferably as short as possible.

In the samples/Particles folder, modify fireish.ptf (or any of the PTFs) and then edit the two lines for system lifetime and system grows older:


Run the sample and then select that particle effect. When the timer for the system life counts to zero, it crashes.

Hm, I can’t seem to reproduce the problem. I think it’s already been fixed on CVS head.

the problem happens when I select the system grows older option in the particle panel. I’m using panda 1.6.2 on windows and it immediately crashes python, not panda, generating a memory dump.
windows says the problem is in “msvcr90.dll” at offset 0006c955

I’m pretty sure msvcr90.dll is a Visual Studio standard library so it is likely that python is executing panda’s C code when it crashes.

I think linux and apple users don’t have this problem because panda is using a different interface to do whatever causes the problem on windows

if anyone has windows and is using the CVS, please try the particle panel to see if the problem is with panda or with just my copy

the error report says:

Exception Information
Code: 0xc0000417
Flags: 0x00000001
record: 0
address: 0x000000007858c955

Naww. “python” is just the process in which the problem occurred - it might as well be in one of Panda’s DLLs. “msvcr90.dll” is just what the top frame in the stack was located.

I just tried it in Windows, using latest CVS build of Panda and I’m getting a crash too. I’ll investigate.

what I meant by the python process crashing is that I don’t think that python code caused the crash since it would be difficult to actually crash the interpreter with faulty python code. Just like indexing a non-existing array element causes a IndexError, not a interpreter crash
However, if the interpreter called a native routine from a DLL, and that routine caused a system exception then that could take down the whole interpreter.
Or it could be a bug with python (triggered by faulty code), but I think python is very robust so it’s unlikely

Yeah, I traced the crash to panda/src/particlesystem/particleSystemManager.cxx, line 124.

Apparently, MSVC doesn’t like it if you let an iterator to a list go past list.end(). That could explain why it worked fine on Linux.
I’ve just checked in a fix to CVS.

Sweet! That’s the same crash I was getting.

Guess I will have to start poking around with the latest revision, then.

thanks, can’t wait to download the fix

This was actually minor thing i run into when i was working with panda3d particles. Its great to see that that was fixed.

But panda3d particles system still lacks key features like:
trails, beams and other lines
spawning particles from other particles
accessing particles through code

Its also pretty slow because it uses up tons of vertex buffers for very simple fx. Vertex buffers is probably the leading cause of FPS drop in most panda3d projects.
mashing textures into one (or as little as possible) and use a single vertex buffer would get rid of this problem completely.

It also limited because it was design in preshader age.
Missing glow, fuzzy edges, volumetrics.