Closed ManPython closed 2 months ago
This seems more appropriate to ask in the script's repo? And if you believe this to be a Tiled issue than a problem with the script, you should explain why.
That said, it sounds like you're running into a Tiled bug that was fixed in 1.11-ish (I'm guessing by your Tiled version you meant 1.9.2, not 2.9.2?), so you should be able to run the script without this problem if you use the latest version.
1.11.0 not 1.9.2 ..I'm always checking ver on news.. - bad case..
Another user reported the same issue on Discord. I haven't had it happen (1.11 x64, Win10). Seems intermittent, so perhaps there's still an ownership issue somewhere, causing the signal or the asset to get garbage collected somehow.
It's start visible when I have more .tmx files with custom parameter, but even using more Tiled I see more unexpected behaviors.
Bjorn, dogboydog, and I discussed this issue on Discord. The likely cause is that when an Tiled object (a TileMap in this case) owned by C++ is deleted, there's no reliable way to automatically clear any remaining JS-side references to it, they remain non-null. There is probably no way for Tiled to fix this, this is something all Tiled scripts have to watch out for.
I've modified the Select Layer Tiles script to check not only that the TileMap reference exists, but also that it isTileMap, which should be sufficient to also catch deleted TileMaps and avoid trying to disconnect from their signals. Please get the latest version of the script, or add the same check in your local copy: https://github.com/eishiya/tiled-scripts/commit/f4a51aa1fdc57b5ac3748b5ad6b39e7ef5b6a2e5
Issue fixed in script, so closing this.
This seems more appropriate to ask in the script's repo?
Indeed this should have been reported at https://github.com/eishiya/tiled-scripts/issues, but no problem.
Describe the bug In some reason I have log:
Tiled/extensions/SelectLayerTiles.js:33: TypeError: Cannot call method 'disconnect' of undefined
To Reproduce
Expected behavior
Media
Specifications: