Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mutex guard tile_map_layer dirty.cell_list.
TilesEditorUtils calls tile_map->set_pattern from a thread (to refresh tile pattern preview images). set_pattern sets each of the cells into the temporary map, marking them dirty via set_cell. This can race against the tree invoking the TileMapLayer's internal_update, which proceses dirty.cell_list and eventually clears it. If a cell's shared dirty entry ends up losing the race, clear can get stuck in an infinite loop where remove refuses to change it because the entry doesn't think it's a member of the list, but the list head still points to it. This spams ERROR: Condition "p_elem->_root != this" is true. at: remove (./core/templates/self_list.h:80) And eventually leads to a crash when the error message buffer fills. Guarding the list mutations avoids the race that sets up for this failure, fixing https://www.github.com/godotengine/godot/issues/86226
- Loading branch information