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

Editing Properties externally causes Error #1904

Closed
phanxgames opened this issue Mar 13, 2018 · 2 comments
Closed

Editing Properties externally causes Error #1904

phanxgames opened this issue Mar 13, 2018 · 2 comments
Labels
bug Broken behavior.

Comments

@phanxgames
Copy link

phanxgames commented Mar 13, 2018

- How the issue can be reproduced

Create a new map with Base64/zlib compressed, add a property to the map or layer.
Save the file to .tmx
Open the .tmx in notepad++ externally, edit the property value.
While Tiled is still open, it attempts a reload of the .tmx file and the error appears.

- What behavior you expected instead

It should reload the .tmx properties back into Tiled without an error popping up.

- What actually happened

An error appears, but it does seem to reload the properties, however as expected.

tiled_bug

On repeated testing it appears to not always throw an error pop-up.

- Tiled version, operating system, etc. if possibly relevant.

Windows 10, Tiled Version 1.1.3, 32-bit installed
I also reproduced with an old version 0.17

** * * * EDIT * * * **

I have narrowed it down to a conflict with Notepad++, this error does not appear when using standard Notepad... We suspect it has to do with Notepad++ and the Tiled file watcher conflicting.

I have closed this issue. Sorry to bother you.

@bjorn
Copy link
Member

bjorn commented Mar 13, 2018

Don't just close the issue! I'm sure there is a way to make this work even when you're using Notepad++.

In fact, the problem here is that Tiled tries to reload the file as soon as it gets a change notification. This is wrong, since the program making modifications may not yet be done writing the file (as is likely the case here). To fix this, there should be a short delay before trying to reload the file, like maybe 250ms after the last file change notification (it should be a short delay for a human, but very long for a PC).

@bjorn bjorn reopened this Mar 13, 2018
@bjorn bjorn added the bug Broken behavior. label May 27, 2020
@bjorn bjorn closed this as completed in 328dc41 Jun 2, 2020
@bjorn
Copy link
Member

bjorn commented Jun 2, 2020

I didn't test the change, but you should be able to edit your maps comfortably with Notepad++ now. The fix will be included in Tiled 1.4.

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

2 participants