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

Strange "locking" behaviour when used with The Furnace's function to drag folder of actors onto map #15

Open
DuskyVoltage opened this issue Dec 27, 2020 · 2 comments
Milestone

Comments

@DuskyVoltage
Copy link

DuskyVoltage commented Dec 27, 2020

This is a strange and specific issue, so bear with me.
The Furnace has a function where you can drag a folder of actors onto the map to quickly deploy multiple tokens at once.

When both Token Attacher and The Furnace are active, a strange behaviour occurs.
Randomly, but frequently, some of the deployed tokens will become stuck. Unable to be moved or interacted with at all, and upon restarting the server the token in question will be gone.

None of the tokens in question need to have anything attached to them, but the issue only occurs when both The Furnace and Token Attacher are active. (I've also tested with only these two modules active)

I managed to reliably recreate this issue by making a folder of a dozen freshly made junk actors then deploying them onto a map. I select all of them and attempt to move them, and one or two are often left behind and become stuck. (Though I've had instances where it's taken 2 or 3 folder-drops).

Start position: https://i.imgur.com/ic9TQH2.png
Tokens after selected all and dragged to another position: https://i.imgur.com/wrxKrza.png
Moved downwards immediately after: https://i.imgur.com/ljRO9Eu.png

@KayelGee
Copy link
Owner

I looked at my createToken hook and I think this might be caused by me, because I'm doing something even though nothing is attached.
Besides this the issue is probably caused by a core foundry issue that is fixed in 0.8.x where a update can break another update on the scene. In this case I'm doing a useless update after a token has been created and this update can interfere with one of the other create updates. This is a race condition so it makes sense that it sometimes works and sometimes it doesn't.
I will remove the update when nothing is attached, but if you would do this with a folder with attached stuff it might break occasionally anyways until 0.8.x.

@KayelGee
Copy link
Owner

Nevermind I misread my own code. I'm not doing any updates so I wonder if the race condition is somehow triggered by my getFlag calls.

@KayelGee KayelGee added this to the 4.x milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants