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

World Map chunks getting loaded twice. #3927

Open
grumpygamer opened this issue Apr 15, 2024 · 4 comments
Open

World Map chunks getting loaded twice. #3927

grumpygamer opened this issue Apr 15, 2024 · 4 comments
Labels
bug Broken behavior.

Comments

@grumpygamer
Copy link

I have notice some odd behavior when editing world maps. A map chuck gets opened twice (2 tabs) and one of them is a old version, it seems these come from a chuck loaded due to it being next to an active chunk and it's showing an old in-memory copy, not the current. I have lost work with this due to the outdated chucking being saved. Closing Tiled and restarting always fixes it.

  • Mac 14.2.1
  • Tiled Version: 1.10.2
@grumpygamer grumpygamer added the bug Broken behavior. label Apr 15, 2024
@eishiya
Copy link
Contributor

eishiya commented Apr 15, 2024

Can you clarify what you mean by "chunk" please? Normally, this term refers to the data chunks used by layers within a single map, but it sounds like by "chunk" you mean separate maps in a World?

One thing to try to avoid this is disable "restore previous session on startup", and load your Project manually after starting Tiled. At least, I suspect Tiled's issues with occasionally opening the same document twice (it's been more often reported happening with tilesets) are related to that feature.

@grumpygamer
Copy link
Author

By chunk I mean the sub-maps that make up a world in Tiled.

@eishiya
Copy link
Contributor

eishiya commented Apr 15, 2024

Those are all separate, wholly independent maps, they're just displayed together as part of a World.

However, it is possible that a map being opened as part of restoring the session and as part of a World could be part of the issue. It shouldn't happen, and normally doesn't, but I suspect there's something weird happening specifically when automatically restoring the last session.

@bjorn
Copy link
Member

bjorn commented Apr 25, 2024

I was able to reproduce this issue today. The problem happens because the implementation of reload-on-change only replaces the map in its own editor tab and not the instances of the same map within the world in other tabs. So after the reload, we have both the old and the new version loaded. When you then click an old version of the map, it will get its own tab alongside the new version. :-/

I will look for ways to make sure no old versions of maps will stay around in a world. This also means they need to be watched for changes even when no editor is currently open for them.

Until this is fixed, I can only advice to close Tiled while updating files using version control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

3 participants