Page MenuHome

Particles : Keyed Physics target UI greyed out as well as crash when clicking on a particle slot without a valid target
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: Quadro M5000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 372.90

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e
Worked: (optional)

Short description of error
[Blender closes up when clicking particle system slot]

Exact steps for others to reproduce the error

  • Open the file
  • Click on particle system slot

- Crash]
[Based on the default startup or an attached .blend file (as simple as possible)]

Event Timeline

Using the provided blend files i can assess that:

  • The crash not only happens by clicking on the particle system slot, it can also be triggered by going into the modifiers panel, clicking on the particle system modifier's name, and then clicking out. Pressing Esc to cancel editing does not trigger the crash.
  • It can also be triggered by going to the outliner, expanding the practice collection, hiding and the re-hiding the Cube object

The log file reads:

Particle distribution error: Nothing to emit from!
Error   : EXCEPTION_ACCESS_VIOLATION

This crash can no longer be triggered with the previous circumstances when the following is done:
Selecting any object in Particle Settings/Physics/Relations/Target Object
By doing this, the crash doesn't happen under any of the circumstances listed above.
I'm gonna try to dig into this

This didn't happen in blender 2.79b

it doesn't happen either if you have another particle system with no empty target object on a relation in the keyed physics type. Setting the other particle system physics type to keyed with no target object leads back to crashing

Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.

Can confirm, problem seems to be twofold:

  • under Relations, the Target Object as well as System counter should still be active when you dont have a valid particle target specified [ after all, this is how you would pick a valid one ;) ]
  • crash should not happen

checking...

Philipp Oeser (lichtwerk) renamed this task from Particle system slot to Particles : Keyed Physics target UI greyed out as well as crash when clicking on a particle slot without a valid target.Fri, Sep 13, 9:56 AM

It goes a bit further than that. After debugging the error, I found out that, when setting the physics' type to keyed, and proceeding to trigger the crash, the object's particle system somehow loses it's psys->particles reference, which in turn makes it return a psys->totpart of 0, which makes the object become an "invalid target", which makes the gpu_batch module thingie crash because verts is 0. I've been trying to find out why the particle reference is clearing its psys->particles.
Maybe there's something that's missing, something i don't understand about blender's pipeline.

Philipp Oeser (lichtwerk) claimed this task.

I've pushed fixes for both problems, the one you describe was because code skipped the vertex buffer creation in case of keyed particles without a valid target.
So this should be resolved, feel free however to comment again if issues persist...