fsVfxSpawnOnSimObject throwing an exception

Version: 1.37.2.0

Frequency: Consistently

Severity: Blocker

Context: in a WASM module, trying to attach an effect to a SimObject

Bug description: The following Exception gets thrown when trying to attach an effect to a non-ego SimObject (Ai Traffic in this case). Attaching to ID 0 (ego) works. After some trial and error, it seems to occur when the Simobject is not done loading. Any way to know if the traffic aircraft has loaded before I try to inject?

Exception thrown at 0x00007FF7DB01E48E in FlightSimulator.exe: 0xC0000005: Access violation reading location 0x0000000000000008.

Repro steps:

Inject an effect using id = fsVfxSpawnOnSimObject using the ID of an AI aircraft.

image

Hello @runshotgun

That’s correct, this happens when the object is not loaded yet.
This will be fixed and will now return FSVFXID_NULL.
We don’t really have a reliable way to test if the AI is loaded yet so repeating the call until you get a correct ID is the way to go at the moment.

Thanks for reporting the problem.
Regards,
Sylvain

1 Like

This is fixed in SU15 flighting build 1.37.5.0

Regards,
Sylvain

1 Like