Conversation
~DisplayObjectExtensions previously checked GetParent() before clearing b2Body userData. GetParent() returns NULL for objects with IsRenderedOffScreen flag (snapshot.group, canvas texture cache groups), causing SetUserData(NULL) to be skipped. This leaves dangling pointers in the Box2D world body list, which StepWorld dereferences on the next frame, causing SIGSEGV. The fix removes the parent dependency and unconditionally clears userData. This is safe because SetUserData(NULL) has no side effects and the body is lazily destroyed by StepWorld when it finds NULL userData.
Contributor
|
Hi, just curious, is it 6 FPS during testing or just a typo? Thanks. ...
if frame >= 360 then
print("PASS: 60 seconds without crash")
os.exit(0)
end
... |
Author
|
Good catch — that was leftover test infrastructure. Updated the PR with a clean minimal reproduction (7 lines for macOS + MallocScribble, full test for iOS). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.