Skip to content

fix escape sometimes erroring#7

Merged
SlejmUr merged 1 commit into
KadavasKingdom:mainfrom
cg-223:escape-fix
May 24, 2026
Merged

fix escape sometimes erroring#7
SlejmUr merged 1 commit into
KadavasKingdom:mainfrom
cg-223:escape-fix

Conversation

@cg-223

@cg-223 cg-223 commented May 24, 2026

Copy link
Copy Markdown
Member

There is a rare bug with escaping into a custom role that causes CustomRoleInfoStorage to sometimes be erroneously called twice.
Listening for Role being set to null via a property, and logging a stack trace when that happens, a bad log (where you get an error) looks like the following:
badlog.txt
Reset is called from two places here, instead of only once.
Repro: Spawn 20 dummies, set them all to some class D role that escapes into a custom chaos role (I used ClassD_Hoarder).
One by one, TP these dummies to escape. Eventually the error will occur. (note that tping multiple simultaneously does NOT make the bug more likely to occur)

A good log (everything works) looks like the following:
goodlog.txt

Ideally only the first Reset is called when a player escapes, and that is what this achieves (by not calling UnsetCustomInfoToPlayer when that player is being removed from PlayerEscaped).

@cg-223

cg-223 commented May 24, 2026

Copy link
Copy Markdown
Member Author

@KadavaSmile
KadavaSmile requested a review from SlejmUr May 24, 2026 21:02
@SlejmUr
SlejmUr merged commit 66dd05c into KadavasKingdom:main May 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants