Skip to content
Snippets Groups Projects

Fix segfault when destroying wall spike while it moves

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-wallspike-segfault into next

This patch fixed a segfault that triggers when a wall spike is destroyed while it's either expanding or contracting. This happens because of the spike's state changes to S_NULL which removes the mobj, but no logic exists to handle cases where the mobj is removed while it's is the process of changing state.

The easiest way to reproduce this issue is in CEZ2 as Amy. At the beginning where the ground falls apart, go down and land on one of the upper platforms where there are moving spikes. Then, try to time Amy's hammer to break the spikes while it's either expanding or contracting, and if timed correctly, the game will crash (I recommend doing this with a build compiled with DEBUGMODE=1, since the bug doesn't trigger consistently otherwise).

Edited by Hanicef

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading