Tiled: spinlock on Tiled 1.0.1 for macOS (terrain tool logic, hung main thread, infinite loop)

Created on 19 Jun 2017  路  3Comments  路  Source: mapeditor/tiled

is it possible to limit the terrain tool's logic to a reasonable perimeter? Sometimes the preview it generates affects the entire map. When this happens, the main thread is hung for quite an alarming amount of time. Finally, while using the terrain tool, the main thread hung indefinitely. I took a spinlock (stack trace) and that is attached.
Spindump-Tiled-deadlock-terrains.txt

bug

All 3 comments

is it possible to limit the terrain tool's logic to a reasonable perimeter? Sometimes the preview it generates affects the entire map. When this happens, the main thread is hung for quite an alarming amount of time.

Not at the moment, though this is certainly an area needing improvement. When all transitions it may need are available, the change should usually be minimal, but it can end up modifying the whole map when it can't find any exactly fitting tile. I'll look into building in some kind of sane limit until a better version of the algorithm has been implemented.

Finally, while using the terrain tool, the main thread hung indefinitely. I took a spinlock (stack trace) and that is attached.

Hmm, the stack trace does not mention the terrain tool anywhere, but it mentions the BucketFillTool. Could that have been hanging instead and do you have any way of reproducing that issue?

I tried for a bit tonight to reproduce this and could not. Might have been an ultra rare case. I was fairly sure I was terrain'ing when the lockup occurred, but the stack trace doesn't lie. As a result, I tried mixing in the temporary hangs from my poorly defined terrains that cause the preview to be quite large (thus, a bit slow to render) with switching to and working with fill tool, but with no luck. I'll come back if I find a reproduction case, though, and no worries if I need to file a new ticket at that time. Cheers

Seems like you ran into #1624.

Was this page helpful?
0 / 5 - 0 ratings