Squalr / Squally

2D Platformer Educational Game for Teaching Game Hacking - C++/cocos2d-x
https://store.steampowered.com/app/770200/Squally/
Mozilla Public License 2.0
461 stars 58 forks source link

Non-deterministic Crash on First Two Fights on OSX #146

Closed zcanann closed 4 years ago

zcanann commented 4 years ago

The first two fights on OSX can crash. It seems to occur from the hackable healing spells/potions, and is only triggered on enemy death as far as we know.

This has a few candidate causes:

The 2nd one only matters if any local variables are accessed post-deletion

One possible solution is that instead of deleting timeline events on completion, handle it similar to the way we despawn entities -- simply deactivate them and hide them.

They'll get cleaned up on scene change, so we don't need to worry about use-after-delete bugs.

zcanann commented 4 years ago

If it's case 2, then this bug is likely fixed on dev.

Will require testing to be 100% sure

zcanann commented 4 years ago

I havent seen it again, gonna assume it was fixed