-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TileMapEditorPlugin
crash by storing tilemap ID instead of pointer
#80610
Fix TileMapEditorPlugin
crash by storing tilemap ID instead of pointer
#80610
Conversation
Is this relevant for 4.1.x too, or fixing a regression from 4.2-specific changes? |
Amusingly, it looks like 4.1 already has a similar fix already applied. Maybe it got broken doing 4.2, or someone else noticed the same problem there in 4.1. 😀 Yeah @groud I think originally did this with |
Failed the If it is genuine maybe there's an access of |
Both of these are consistent with The interesting bit is why the CI is failing (assuming not a false flag, I've run it twice), possibly memory corruption / double free going on. I'm not familiar enough with I'm happy for you @KoBeWi to investigate, or use #80537 which is simpler and doesn't seem to cause this (at least temporarily), or some other solution. |
Store the tilemap ObjectID instead of raw pointer, and check it is valid before access.
d23a5b5
to
356fc72
Compare
Ah I missed that this is a separate PR from #80537. I though you just applied my requested changes 🙃 |
Also just to note, if |
Editor works on single thread, only specific tasks (like importing or baking) are multithreaded. |
Actually, thinking about it, this could come down to differences in our debuggers. Maybe mine is catching the access to deleted object early, and yours is running the function on the remnants of the deleted object. To check the lifetime was the problem when I wrote this, I put a |
Sanitizer build has now passed, and the only change was removing that space. |
Thanks! |
Store the tilemap ObjectID instead of raw pointer, and check it is valid before access.
Fixes #80609
Alternative to #80537
Notes
ObjectID
for all accesses rather than raw pointerNodes
are ref counted.