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

TileMap patterns crash editor in large quantities #86097

Closed
WolfgangSenff opened this issue Dec 12, 2023 · 6 comments
Closed

TileMap patterns crash editor in large quantities #86097

WolfgangSenff opened this issue Dec 12, 2023 · 6 comments

Comments

@WolfgangSenff
Copy link
Contributor

Tested versions

I tested this in the latest, 4.2.1 release, but I imagine it has been there since 4.0 or so.

System information

Windows 11, 16 gb RAM, 11th Gen Intel i7

Issue description

If you add lots of patterns to a single tileset, it does two things:

  1. With every new pattern added, it reloads all the patterns in the tileset - and if those patterns are somewhat large, it can take quite some time to reload them.
  2. It will sometimes crash if there are a lot of patterns already. Around 50 apparently, or perhaps exactly 50?

Steps to reproduce

  1. Create a project
  2. Create a new main scene
  3. Add a TileMap node, create a tileset for it, add something with a few tiles you can make patterns out of
  4. Go through the process of creating a bunch of patterns
  5. At some point, it will start reloading all of the patterns and it'll be obvious - they'll all disappear and then start showing up more slowly
  6. At some point, it will crash, and if you haven't saved (possibly even if you have), you will lose all of your hard-earned patterns. The limit on the patterns appears to be around 50, although that might be based on the number of other tiles I have in the tileset, if patterns take up the same space as tiles.

Minimal reproduction project (MRP)

No MRP since it's not dependent on the situation at all.

@ConstantChange
Copy link

Working and editing large tilesets seem to crash the engine too.

@cctvzj
Copy link

cctvzj commented Dec 17, 2023

yes, I also found it.

@AThousandShips
Copy link
Member

AThousandShips commented Jan 22, 2024

Thank you for reporting, closing as a duplicate of:

Which should be fixed by:

If you are able to test this please confirm 🙂

@AThousandShips AThousandShips marked this as a duplicate of #86226 Jan 22, 2024
@AThousandShips AThousandShips closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2024
@WolfgangSenff
Copy link
Contributor Author

It does seem to fix the crash (tested on the same machine that was borked before)! I did notice however it is still horrendously slow, and it feels like the algorithm just needs to be rethought, perhaps. You can even cause some interesting visual glitches when the patterns get up to a high enough count and then you add patterns to it while it's still reloading them all.

@AThousandShips
Copy link
Member

Not slow for me, but wasn't changed by this PR but instead due to the massive size, please open a new issue report and provide a minimum project to show this issue (couldn't see any glitches or slow processing with the above issue report, which has a project)

@WolfgangSenff
Copy link
Contributor Author

I will go ahead and do that, then! It only starts really happening at 50+ patterns, but in any case, I'll save it for the next report.

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

5 participants