ValveSoftware / steam-audio

Steam Audio
https://valvesoftware.github.io/steam-audio/
Apache License 2.0
2.26k stars 158 forks source link

[C API] Multiple probe batches in a simulator can cause pathing simulation exception #237

Open Oldnice opened 1 year ago

Oldnice commented 1 year ago

Adding multiple probe batches to a simulator, and later running iplSimulatorRunPathing(...) sometimes causes an access violation exception.

I'm not sure if this requires the probe batches to overlap or not, but adding the same probe batch twice to the scene is an easy way to reproduce the exception (at least in my scenario). Once multiple pathing probe batches are added to a scene, it can crash almost instantly once the simulation starts, or once the listener has moved to a certain spot in the scene. This same spot can be later used to trigger the exception again.

This issue stops you from being able to dynamically load & unload probe batches in a scene, as you might hit the unknown conditions for the exception. Instead, all probes in a scene have to be loaded in a single batch, no matter how big the scene.

I'm using a custom C-API integration, with baked pathing only. If the developers are unable to duplicate this exception, I can try to prepare some data for testing.

Oldnice commented 1 year ago

Crashes also happen with only a single probe batch. This might have something to do with overlapping probes, or probes with too big reach, or a combination of both. I'm able to reproduce the crash pretty consistently, and it tends to happen with the listener in a similar spot each time.

With the inclusion of the debugging symbols (thank you for those!), I'm at least able to point out the offending call stack: pathing_crash

Oldnice commented 1 year ago

Here's a call stack with the actual line numbers visible: lines