Page MenuHome

ParticleInstance: crash with hidden particle system + children
Closed, ResolvedPublic

Description

Relates to: T32058

win7 x64, tested with both official 2.64a and 51350

this is a slight variant of bug #32058

anyway, follow the same steps, but before saving and reloading the file, enable child particles for the particle system, and enable the children option in the particle instance modifier.

boom, crash on reload!

attached is an offending file

Event Timeline

Lukas, seems to be just matter of adding check for DM != NULL, but not sure where it'll be the best place for this. Since you've looked into related issue think it'll be much easier for you to look into this issue too?

Yes, checking for DM != NULL is simple, but unfortunately the problem is rooted deeper:

Particle Instance modifier depends on a different object with the Particle System modifier, which is handled nicely by the depsgraph. However, disabling the System modifier usually leaves the psys in an invalid state ... This is unlike real modifiers, which simply use the unchanged input DM.

Next to the missing DM pointer (accessed from the cached psmd data) we found at least one other variable that causes trouble (lazy-initialized frand array). Finding all potential invalid variables etc. is almost impossible due to the convoluted code, i would rather not attempt major changes here.

Simple solution: never disable the particle system modifier! I will try to implement a way of preventing "disable" of that modifier. It is an ugly hack to fix a broken design, but guess we all know that by now ...

Fixed in SVN.

Note that the Particle Instance modifier will now be disabled automatically if the Particle System modifier is disabled. This is the only sane way to ensure it doesn't try to access invalid data. So in this case you need to re-enable the Particle System modifier to make the instancing work!

Lukas Tönne (lukastoenne) changed the task status from Unknown Status to Resolved.Oct 17 2012, 11:51 AM