Search Issue Tracker

Not Reproducible

Fixed in 2021.2.X

Votes

0

Found in

2021.2.3f1

2021.2.13f1

Issue ID

1407532

Regression

Yes

Crash with "RendererUpdateManager::RemoveRenderer" when using undo after adding Tilemap to the List

2D

-

Reproduction steps:
1. Open the attached "1407532.zip" project
2. Create a new TilemapGroup GameObject (Hierarchy -> Right-click - > SuperTilemapEditor -> TilemapGroup)
3. Select the TilemapGroup GameObject
4. In the Inspector -> TilemapGroup -> Tilemaps add a new Tilemap to the list
5. Use the Cmd/Ctrl+Z shortcut key or Edit > Undo
6. Observe the crash

Reproducible with: 2021.2.3f1, 2021.2.14f1
Not reproducible with: 2021.2.0a21, 2021.2.2f1, 2022.1.0a1, 2022.1.0b10, 2022.2.0a7
Could not test with: 2019.4.36f1, 2020.3.30f1 (Errors when downgrading 2D Common package)

First few lines of the stack trace:
0x00007ff6c6b5de08 (Unity) RendererUpdateManager::RemoveRenderer
0x00007ff6c6b4a628 (Unity) Renderer::RemoveFromScene
0x00007ff6c6b482b7 (Unity) Renderer::Deactivate
0x00007ff6c69b65b8 (Unity) GameObject::ActivateAwakeRecursivelyInternal
0x00007ff6c69b61c9 (Unity) GameObject::ActivateAwakeRecursively
0x00007ff6c69b8d69 (Unity) GameObject::Deactivate

  1. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.17f1

Comments (5)

  1. MatasVa

    Sep 25, 2022 11:34

    Reproducible in 2021.3.10f1

  2. lazuardiyaffan

    Sep 15, 2022 02:00

    Happened to me as well in 2021.3.9f1

  3. EidLoi

    Sep 03, 2022 15:14

    never mind, it keeps crushing. Classic Unity.

  4. EidLoi

    Sep 03, 2022 15:00

    The solution I found was to register the created component for undo instead of its game object.

  5. EidLoi

    Sep 03, 2022 14:57

    This issue appeared again in v2021.3.9f1 LTS. Weirdly enough I am working on a tilemap editor and I didn't have the issue in 2021.3.6f1, but when I upgraded I could no longer undo without crashing. I had no code changes on my end between the upgrades.

    I have an editor tool that lets me paint and there is a code like so:

    Tile tile = PrefabUtility.InstantiatePrefab(prefab, tileGrid.transform) as Tile;
    Undo.RegisterCreatedObjectUndo(tile.gameObject, "Tile created");

    if (OrientTo(tileGrid, tile, profile, x, z))
    {
    tile.InstantiateDecorations();
    EditorUtility.SetDirty(tile);
    return tile;
    }

    Regardless of where the creation undo is registered, it will cause a crash when I undo it.
    If I don't have the RegisterCreatedObjectUndo it works (but of course, leaves the game object there).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.