NoCheatPlus / Issues

Issues managment for the NoCheatPlus project.
13 stars 9 forks source link

Fence SurvivalFly and FastBreak Bug #529

Open ghost opened 6 years ago

ghost commented 6 years ago

Short description of the issue.

A player gets caught on a fence post, causing SurvivalFly violations, and cannot break the block, causing FastBreak violations. The player is trapped!

Complete output of the ncp version command (please prefer text here).

01:35:38 INFO: ---- Version information ---- 01:35:38 INFO: #### Server #### 01:35:38 INFO: git-Paper-1373 ~MC: 1.12.2~ 01:35:38 INFO: detected: 1.12.2 01:35:38 INFO: #### NoCheatPlus #### 01:35:38 INFO: Plugin: 3.16.0-RC-sMD5NET-b1134 01:35:38 INFO: MCAccess: 1.12-1.12.2 / Spigot-CB-1.12_R1

01:35:38 INFO: blocks: BlocksMC1_4 | BlocksMC1_5 | BlocksMC1_6_1 | BlocksMC1_7_2 | BlocksMC1_8 | BlocksMC1_9 | BlocksMC1_10 | BlocksMC1_11 | BlocksMC1_12 01:35:38 INFO: checks: FastConsume | Gutenberg | HotFixFallingBlockPortalEnter | AttackFrequency | FlyingFrequency | KeepAliveFrequency 01:35:38 INFO: defaults: pvpKnockBackVelocity 01:35:38 INFO: packet-listeners: UseEntityAdapter | MovingFlying | OutgoingPosition | KeepAliveAdapter | SoundDistance 01:35:38 INFO: Hooks: AllViolations~NCP~ 1.0 01:35:38 INFO: #### Related Plugins #### 01:35:38 INFO: ProtocolLib v4.3.0

How to reproduce the issue (is it random / always happens / side conditions)?

Building a fence post by leaping onto one and crouching at the same time triggers the SurvivalFly check. The player is then also unable to break the blocks due to the FastBreak check.

Have you made any (noteworthy) changes to the default configuration of NCP?

Yes, however "cancel" is first in both of these checks, followed by a logging option.

Do you run any other special plugins that affect game mechanics next to NC+ (adding skills, machines, adding/changing blocks, other anti cheating)?

Nope.

Provide additional information, such as error/debug/violation logs. (For reproducible issues with moving consider: https://github.com/NoCheatPlus/Docs/wiki/Debugging#on-the-fly-debug-output-for-individual-players) Use GitHub gists or http://pastebin.com/ or similar for huge logs, or attach a (zip-) file here. For image uploads, please prefer a site that allows viewing without JavaScript, you can upload file attachments for issues right here.

Here are three pictures of the problem: https://cloudup.com/itlOeiAgHa7 https://cloudup.com/iDAQec4UDgK https://cloudup.com/inwpurmu7yq

asofold commented 6 years ago

The 'stuck in a fence post' part might already have been fixed around build 1041 or later.

ghost commented 6 years ago

I just tested it running 1043 and it's not fixed.

asofold commented 6 years ago

Sorry, build 1041 is a dead end, i didn't mean that one - mixed up messages there ~ it's a downgrade from 1134.

I'm sure i fixed a "stuck in fence" case with recent builds (114x perhaps) OR i've fixed it in the 5k-lines addition for which no build exists so far. It's just not in the commit message.

Edit (n): It's certain that i've fixed something some time after build 1134, i.e. in 3.16.1, as noted on the build-infos page: https://github.com/NoCheatPlus/Docs/wiki/bip-3.16.1-and-later#3161-snapshot-smd5net-b1142cumulative (3.16.0 ends with build 1134.)

asofold commented 6 years ago

1141 (Feb 6, 2018 2:58:20 PM)

Passable / initially colliding blocks: catch 1.5 height. (commit: 715a49d) — asofold / githubweb

(...)

The significant change has been made in build 1141, though i'd rather use 1143, unless it breaks something.

Edit: Apart from that i'm not 100% sure it fixes your issue, but it might. (Need to reproduce.)

ghost commented 6 years ago

Ha, I mixed things up as well. I meant I tested build 1143 and it’s not fixed.

Edit: Is this one safe for production?

asofold commented 6 years ago

Since build 1140 the following bug has been introduced: https://www.spigotmc.org/threads/nocheatplus.1428/page-25#post-2947873

That means that some of the frequent tasks are not run for a random range of players (anymore), once the bug comes into effect - at this stage i am not sure, if this bug has the prerequisite of a custom data removal together with a player who has just been kicked or who just left the server. It might be enough to not let data expire too fast (don't activate and set duration to 0).

So i'd wait until things have stabilized with the latest builds since build 1144, which fixes that issue. A lot of changes is inside and it might break some plugins that hook into NCP (the simple exemption API should not be a problem). It also needs an implementation of data expiration for servers with many players going through.

ghost commented 6 years ago

Okay, and any luck trying to fix this problem? This is a really big one for me. It actually traps people in blocks until someone else frees them, or if they have an enderpearl, etc.

asofold commented 6 years ago

Might not have fully reproduced the actual issue with build 1144 on Spigot 1.12.2.

What i could get is a debug log of:

Not sure what i can do here - last time i tried cancelling those events, they could be cancelled on Bukkit side, but the server would still teleport (...).

asofold commented 6 years ago

Inspecting the log, it looks like these are vertical teleports to just a bit underneath 1.5 fence height to. Events were like:

Looks like those special cases can and should be detected for 1.5 high blocks - not 100% sure of counter measures and what will actually work, e.g.:

ghost commented 6 years ago

Do any of the new development builds—which look more stable to me now since they don't say otherwise—have a fix added for this bug?

asofold commented 6 years ago

I'm afraid not - wasn't sure myself. Keep nagging, it should be doable and i'll check this out once more next-ish.

ghost commented 6 years ago

Alright, I hope you have time. This seems like a really tricky one here but it traps players on the posts in my experience so much that I think one quit the server because it acted as a jail or something...