AEGP_GetLayerNumEffects crash in AEGP IdleHook
Hello,
I got an intermitent crash when invoking EffectSuite4()->AEGP_GetLayerNumEffects()
I got a setup where I have an effect and an AEGP.
Upon Effect creation, it will register itself on PF_Cmd_SEQUENCE_RESETUP to the AEGP with it's layer ID as key (we stricly enforce an one effect per layer).
The AEGP will save the layer handle (PFInterfaceSuite1()->AEGP_GetEffectLayer()) and push it to a queue to process it in the idle update.
the crash happen when copy pasting / deleting a bunch of solid at once, triggering multiple updates,
I guess my handle get invalidated before it get processed by the AEGP, but is there a way to check the AEGP_LayerH validity ?
I tried to rely on PF_Cmd_SEQUENCE_SETDOWN to unregister effect on the AEGP, but found it unreliable as it get triggered also when copy pasting layer and effects.
TL/DR: How do you manage correctly lifecycle of effect when there are dependant of each other.
thanks in advance
