**REPORTED** Ballista firing results in SoundEffectInstance being accessed after it was disposed

roothorick

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Linux Other
Terraria Version
1.4.0.3
Controls Used
Keyboard/Mouse
This ultimately results in a use-after-free inside FNA.

There's an extensive Twitter thread about how I found it here:
Reproduction steps: Summon a ballista using the Ballista Rod and wait for it to fire. The access happens immediately at the end of the firing sound.

This is one of those "you get away with it until you don't" kind of bugs, where it doesn't have harmful side effects *now*, but if the wrong change happens (like updating FNA and MonoKickstart) suddenly you have strange behavior or a crash that's extremely difficult to impossible to track down.

Obviously I have no insider information, but I suspect this may be a contributing factor in your decision to update to a still-very-old version of FNA instead of the latest, which has preserved audio panning issues and may itself be a contributing factor in the 4K isses on Linux.
 
I think I saw someone mention this before, and while this is over my heard, I appreciate the information, it could be relevant.

The decision to not update is less a decision and more a "we are very busy and we are prioritizing things as we can".
 
After further testing, Flameburst firing, Lightning Aura, and Etherian Goblin death sound causes similar if not the same crash. Bizarrely, Explosive Trap is fine. I think there's something specific to (most) DD2 crossover sounds that triggers the bug.
 
You may be correct there.

Almost all of the DD2 sounds were actually taken from Dungeon Defenders 2 native sound effects and adapted to Terraria, some of them modified in certain ways, but those sfx are actually quite unique in that regard. So there might be something weird about them on some level.
 
Back
Top Bottom