Skip to content

Add safeguards for invalidated model instances#7521

Closed
BMagnu wants to merge 2 commits into
scp-fs2open:masterfrom
BMagnu:texture_replace_crash
Closed

Add safeguards for invalidated model instances#7521
BMagnu wants to merge 2 commits into
scp-fs2open:masterfrom
BMagnu:texture_replace_crash

Conversation

@BMagnu

@BMagnu BMagnu commented Jun 13, 2026

Copy link
Copy Markdown
Member

This fixes the crash for SF:EH that happens sometimes on mission exit.

Also, this is notably just a bandaid fix.
It'll stop the crash for now, but there's an underlying issue that needs resolving.
The Ship_registry will contain valid entries for ships, the objects of which have been deleted. This causes all sorts of trouble, and there's a few ways to mitigate this: Make Ship_registry accesses query for validity of the ships still inside, or make mission deallocation / obj_delete_all / ship_cleanup hard-nuke the entire registry. However, both of these are fairly deep-rooted changes, so they're not great for RCs, and I'd rather just go with the bandaid for now, and properly fix this early in the next nightly phase.

@BMagnu BMagnu added the fix A fix for bugs, not-a-bugs, and/or regressions. label Jun 13, 2026
@BMagnu

BMagnu commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

Superceded by #7522.
This does not negate the issue that we need to deal with Ship_registry at some point

@BMagnu BMagnu closed this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant