Skip to content
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 Crash After Creating Tilemap #86248

Open
rileylyman opened this issue Dec 17, 2023 · 4 comments
Open

Editor Crash After Creating Tilemap #86248

rileylyman opened this issue Dec 17, 2023 · 4 comments

Comments

@rileylyman
Copy link
Contributor

rileylyman commented Dec 17, 2023

Tested versions

4.3.dev 2d0ee20

System information

Windows 11

Issue description

I created an empty project, imported a tileset PNG, created a new tileset, placed a few tiles, undid the placements, upped the tileset size to 128x128px, placed a few more tiles, and then hit run, but the play window crashed. After closing the project and attempting to reopen, the editor crashes now as well.

I think information about those original placements is still stored somewhere when the tileset tile size was 16x16, and since there were more tiles present in the 16x16 tilemap, it crashes with an index out of bounds error now that there are fewer tiles.

A sample of the error spam (it is infinite):

ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
   at: (scene\resources\tile_set.cpp:4153)
ERROR: The TileSetAtlasSource atlas has no tile at (21, 21).
   at: (scene\resources\tile_set.cpp:4590)
ERROR: TileSetAtlasSource has no tile at (21, 21).
   at: (scene\resources\tile_set.cpp:4538)
ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
   at: (scene\resources\tile_set.cpp:4153)
ERROR: The TileSetAtlasSource atlas has no tile at (22, 21).
   at: (scene\resources\tile_set.cpp:4590)
ERROR: TileSetAtlasSource has no tile at (22, 21).
   at: (scene\resources\tile_set.cpp:4538)
ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
   at: (scene\resources\tile_set.cpp:4153)
ERROR: The TileSetAtlasSource atlas has no tile at (23, 21).
   at: (scene\resources\tile_set.cpp:4590)
ERROR: TileSetAtlasSource has no tile at (23, 21).
   at: (scene\resources\tile_set.cpp:4538)
ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
   at: (scene\resources\tile_set.cpp:4153)
ERROR: The TileSetAtlasSource atlas has no tile at (24, 21).
   at: (scene\resources\tile_set.cpp:4590)
ERROR: TileSetAtlasSource has no tile at (24, 21).
   at: (scene\resources\tile_set.cpp:4538)
ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
   at: (scene\resources\tile_set.cpp:4153)
ERROR: The TileSetAtlasSource atlas has no tile at (25, 21).
   at: (scene\resources\tile_set.cpp:4590)
ERROR: TileSetAtlasSource has no tile at (25, 21).
   at: (scene\resources\tile_set.cpp:4538) 

Steps to reproduce

Open the repro, it should crash immediately.

Minimal reproduction project (MRP)

TileMapPlayground.zip

@KoBeWi
Copy link
Member

KoBeWi commented Dec 17, 2023

Can't reproduce the crash, although the editor spams errors for a couple of minutes until the scene is loaded. After that it's possible to go to TileSet tab and cleanup the invalid tiles.

@jsjtxietian
Copy link
Contributor

Can't reproduce the crash, although the editor spams errors for a couple of minutes until the scene is loaded

Same for me. Godot v4.3.dev (b94eb58) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

@AThousandShips

This comment was marked as outdated.

@AThousandShips
Copy link
Member

Still in effect, possible related to:

Will look into this when I have the time

@KoBeWi KoBeWi removed this from the 4.3 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants