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

TShock 4.4.0 Pre 4, Doors disappear #1774

Closed
Kavex opened this issue May 18, 2020 · 19 comments · Fixed by #1960
Closed

TShock 4.4.0 Pre 4, Doors disappear #1774

Kavex opened this issue May 18, 2020 · 19 comments · Fixed by #1960
Assignees
Labels
Confirmed This is a confirmed issue

Comments

@Kavex
Copy link

Kavex commented May 18, 2020

Worlds 5-18-2020-11-52pm.zip

Reproduction steps (if applicable)?

Happening to a user that is overseas so I'm assuming it's due to high latency but when opening or closing doors it will disappear and if there is a trap door next to it then it will duplicate that trap door. I haven't tested this on any other item to see if it duplicates it too.

This doesn't happen to all door but only some of them too.

Any stack traces or error messages (if known)?

No error I can tell

Any screenshots?

https://imgur.com/a/CjxSQGz

Any log messages from files that end in .log or .txt?

No error I can tell

What plugins and what versions of those plugins are you running?

No Plugins

@moisterrific
Copy link
Contributor

https://gfycat.com/showymiserableafricanhornbill

seeing this issue on my end too, it's not high latency, something to do with TShock detecting the smart door opening as cheat and attempting to revert the action

same problem happens for trap doors too I think, they like to vanish from existence when you click on them to open, not sure for tall gates

@breeece
Copy link

breeece commented May 18, 2020

I can confirm, I am getting this as well.

@QuiCM
Copy link
Member

QuiCM commented May 19, 2020

Likely an issue with sent tile again. Cheers, will investigate

@QuiCM QuiCM self-assigned this May 19, 2020
@Mirzero
Copy link

Mirzero commented May 19, 2020

I am getting this in a low-latency environment.
The doors disappear (and sound like they break) as I pass through them.
If I disconnect and then reconnect... the door returns but in the open state.
It also allows me to build new doors in the open holes before I reconnect.

Seems like the door gets forced open, but desyncs from the client.
Will test later if other observing clients see the door break, or just get left open.

@Gameaday
Copy link

Gameaday commented May 19, 2020

Observing clients see the doors as "open" and can interact with them, from my own experience on our server.

Someone breaking the door you cannot see after this glitch occurs (as it remains visible to them) and replacing it makes it visible again to the original client... but it is unbreakable by the original glitched client while "invisible" (until replaced). Hope that makes sense.

Basically it only disappears from one client. If behaves normally for everyone else. And upon replacement by someone else behaves normally again until the glitch reoccur.

@Libbers
Copy link

Libbers commented May 20, 2020

Happening here as well, reconnecting shows them in open state

@QuiCM
Copy link
Member

QuiCM commented May 21, 2020

This is an issue with send tile square handling.
For temporary relief use the tshock.ignore.sendtilesquare permission - until we fix it properly :)

@QuiCM QuiCM changed the title TShock 4.4.0 Pre 1, Doors disappear TShock 4.4.0 Pre 4, Doors disappear May 21, 2020
@QuiCM QuiCM added the Confirmed This is a confirmed issue label May 21, 2020
@stetsonblade
Copy link

Trap doors also auto shut when clicked. I can't get out of a room with a trap door unless I'm an superadmin (maybe admin or higher but I only have default and superadmin). I have the ignore.sendtilesquare added to default which fixed the door issue, but trap door is still an issue.

@lucasvperini
Copy link

I'm getting the Trap door issue too, tshock.ignore.sendtilesquare don't fix the problem.
Any fixes on this?

Thanks.

@stetsonblade
Copy link

I'm getting the Trap door issue too, tshock.ignore.sendtilesquare don't fix the problem.
Any fixes on this?

Thanks.

The only workaround I found so far was set the character as superadmin. Seems like there's some permission in superadmin that fixes the issue...

@QuiCM
Copy link
Member

QuiCM commented May 25, 2020

https://gfycat.com/illegalancientgreatargus

I can't reproduce any door/trapdoor issues while using the tshock.ignore.sendtilesquare permission.
If this only affects specific doors/trapdoors, could someone please list which ones definitely have issues?
Thanks

@SpiderDave
Copy link

I'm getting this issue too, where walking into doors sometimes removes them. It only happens with smart doors enabled, and only when walking into a closed door. Sometimes the door won't disappear but it will make the noise as if it's been mined, and a few more times walking through the door will remove it. I've had it remove a door (obsidian door), then I replaced it with a wooden door. Mining the wooden door sometimes brings the obsidian door back from nowhere (!). I also ran through the large gate in the floor below where the above room's door unplaced, and that above room's door magically came back. I'm not having any latency issues, so I can't say it's related to that.

@hakusaro
Copy link
Member

@SpiderDave we actually know the root cause of the problem -- it's how we handle SendTileSquare packets. The problem is that SendTileSquare is basically the linchpin of all bulk updates -- if you give people the permission tshock.ignore.sendtilesquare it will work, but the damage will be that anyone can do anything to the world, essentially.

@hakusaro hakusaro pinned this issue May 25, 2020
@iFocsy
Copy link

iFocsy commented May 25, 2020

@hakusaro I've noticed and Reproduced that if you get pretty close to the door, and just give a tap, in a normal server it just quickly opens and closes the door, but when SendTileSquare is enable, if you try the same, it will disappear. Years ago i've been following this issue and in past before it got tracked, you had to pretty spam open/close so it happens, now what i've seen using the Debug Verbose, maybe it's because of the delay of the packets sent too quickly?

That's just a curiosity, i'm pretty new to tShock dev side but still need to know more how it handles to see if i can help.

If needed i can record Server Verbose x Client Test to show.

@hakusaro
Copy link
Member

I honestly think that you’ve not given the permission to the affected player — if we don’t do anything with the packet the server processes it like normal. That would make this a vanilla issue but we’re pretty sure it’s not that. You should send debug logs (but we’re working on directly fixing the problem anyway).

@AceofSpades5757
Copy link

Having the same problem with doors and trapdoors in TShock 4.4.0 Pre-release 8.

As a quick fix, I tried to use group addperm * tshock.ignore.sendtilesquare just to get the doors to work.
Restarted and confirmed group permissions with group listperm default and group listperm guest.

Problem persisted.

@hakusaro
Copy link
Member

Do you have debug logs? (Set DebugLogs to true in config.json then run /reload and then cause the issue to happen (you should chat start of issue then move as little as possible to recreate the issue and then chat end of issue) and then upload the logs so we can take a look?)

@Saturate
Copy link

I'll try to set my server to debug as well, we had this issue a couple of times.

@hakusaro
Copy link
Member

Latest build includes a manual /sync command that can be used to force the server to send the correct tile data to a client if their door disappears. This means that it’s faster to resolve than normal.

hakusaro added a commit that referenced this issue May 31, 2020
Fixes #1774.

This commit is designed to fix the clientside door desync issue. Based
on the order of events that I've been able to see, the way that door
opening works is like this:

1. Client sends a door open request.
2. Server echoes request back to client.
3. Both server and client simulate door opening.
4. The client that requests the initial door open sends a tile square to
the server for some reason.

In TShock, under all circumstances, we send a tile square back to the
client that sends one in, unless you have the
`tshock.ignore.sendtilesquare` permission. Therefore, this deviates from
Terraria behavior where a tile square is broadcast to all other players.
Rather, the tile square is sent back to the player who requested it.

This does not really solve the underlying problem or answer the question
as to why sending a tile square back to the client seems to throw it
off, but it does. I was not able to replicate the desync issue anymore
with this branch. I expect that it will be safe to keep, because the
improved logic will only happen if the tile square had no effective
changes in addition to the door changes.
hakusaro added a commit that referenced this issue May 31, 2020
Fixes #1774.

This commit is designed to fix the clientside door desync issue. Based
on the order of events that I've been able to see, the way that door
opening works is like this:

1. Client sends a door open request.
2. Server echoes request back to client.
3. Both server and client simulate door opening.
4. The client that requests the initial door open sends a tile square to
the server for some reason.

In TShock, under all circumstances, we send a tile square back to the
client that sends one in, unless you have the
`tshock.ignore.sendtilesquare` permission. Therefore, this deviates from
Terraria behavior where a tile square is broadcast to all other players.
Rather, the tile square is sent back to the player who requested it.

This does not really solve the underlying problem or answer the question
as to why sending a tile square back to the client seems to throw it
off, but it does. I was not able to replicate the desync issue anymore
with this branch. I expect that it will be safe to keep, because the
improved logic will only happen if the tile square had no effective
changes in addition to the door changes.
@QuiCM QuiCM unpinned this issue Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed This is a confirmed issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.