-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
[Editor] Fix threading problems with TileMap
preview
#87470
Conversation
We could also handle this by not doing the internal update off the tree at all, but that is a solution that has various possible impacts so a more complicated thing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notwithstanding the idea of further investigation, and with the disclaimer that I haven't checked the details, this looks like the right thing to do.
This might fix #86097 too. |
Sounds like a duplicate of #86226, but unable to verify right now |
Thanks! Edit: Almost forgot to meme! Well, if @RandomShaper is happy, then we're happy. |
Thank you! |
Cherry-picked for 4.2.2. |
As investigated in #87458 this is due to threading problems in the editor, specifically the preview generation, this solves this by handling deferred calls on a separate queue, rather than adding thread safety mechanisms to
TileMapLayer
which I'd say aren't necessary otherwise due to thread safety guarantees, I also suspect there are other possible race conditions here that won't be solved by adding those thread safety features, instead I suggest removing the thread safety from the equation entirely by controlling the timingThe general topic of thread safety of nodes not on the tree is a problem and other nodes suffer from problems due to deferred calls AFAIK, so a broader investigation of that and how
TileMap
andTileMapLayer
relates to this should be done as well, but I think the pressing concern here is the editor related crashAlternative to: