CraftBook 3

CraftBook 3

139k Downloads

Illegal position when dismounting chairs. Build 2466.

LadyCailinBot opened this issue · 76 comments

commented

CRAFTBOOK-2645 - Reported by NolanSyKinsley

The server started throwing many errors about craftbook, sadly I did not catch them. They were about an entity already being tracked. Any time a player dismounted a char it said:

CONSOLE: [SEVERE] PLAYERNAME was caught trying to crash the server with an invalid position.

and it kiked them with a "Nope!" message. This happened every time when the errors were being thrown. I restarted the server and now it just happens randomly when a player dismounts a chair with left shift.

If I get the errors again (there were tons of them) I will post them here.

Craftbook report for GPs: http://pastebin.com/HskenfqK

commented

Comment by Richard.Arkless

No right clicking kicks me as well while before it would let me get off the chair.

I decided to test it out on a fresh server with default bukkit (apart from setting myself to op) and plugin config files with just worldedit and craftbook installed and even then it kicks me

Bukkit Version: 1.6.2-R0.1 #2815
WorldEdit Version: I have tried the latest bukkit dev (5.5.7) and latest jenkins build (#1434-4d89b67). Same outcome

I suspected that maybe it could be down to me being op so I installed a permissions plugin (Group manager), deoped myself and only gave myself permission to use the chairs and still it kicks me

Also tried in multiple gamemodes and still the same (at this point im trying everything)

commented

Comment by me4502

And what version of CraftBook were you using?

commented

Comment by Richard.Arkless

On the test server I tried the version where you redid the chairs (#2456) and the latest build with the few chair tweaks (#2475).

I haven't tested the two new builds. I looked at the commits and I couldn't see anything that references the chairs (I can test with those builds if you'd like)

commented

Comment by NolanSyKinsley

build #2477 I still get kicked. I have these arrows that persist, the only way to get rid of them is with worldedit. I am also getting these errors when some players log in:
http://pastebin.com/KCG291L6

commented

Comment by me4502

This may not actually be fixable, and it could possibly be a bug in minecraft or bukkit.

commented

Comment by Богдан.Шкляренко

http://cs416922.vk.me/v416922094/5ed8/EihBGvhXqaI.jpg
Error msg. Players kicked from server with message "NOPE"
Using latest Spigot and CB.

commented

Comment by Richard.Arkless

@me4502 Ok thanks, for now I will disable chairs.

Will you be reverting back to using ProtocolLib to handle the chairs (Until a solution or alternate method is found) as ive noticed that it is not just us but people who use Chairs Reloaded (which now uses the same method as you). I know that the sitting animation is broken but that is better than nothing and im sure it can that be fixed

commented

Comment by me4502

I honestly don't see the point of no chair animation, they player may as well stand on the chair and sneak.

Seeing as I don't get this issue, but I have optifine installed on my client.. There is the possibility of a client bug? Do either of you use optifine?

commented

Comment by Richard.Arkless

But can the sitting animation be fixed if you were to revert back to ProtocolLib or isn't it possible anymore?

And yes I use optifine

commented

Comment by me4502

No, it's not possible using ProtocolLib.

Hmm.. So it's not optifine that fixes it..

commented

Comment by Richard.Arkless

Hm do you mind zipping up your server setup so we can see the difference between our setup and yours. Its strange that a lot of people have got this problem but yours is fine

commented

Comment by me4502

I'm fine on any server, which is why I suggested it possibly being optifine. I haven't tried other players on the server I was testing on.

commented

Comment by me4502

After testing, it seems to be caused by a bug in bukkit introduced in either:
Bukkit/CraftBukkit@2482f53
OR
Bukkit/CraftBukkit@2a13a5a

commented

Comment by me4502

(If anyone is able to test which of those commits are causing the bug, I can submit it to the bukkit Jira)

commented

Comment by Richard.Arkless

Ok after a bit of testing it appears that this bug is caused by Correctly fire VehicleExitEvent (Introduced in Bukkit Build 2813). Build 2812 (Arrow.isOnGround() always returns false) was fine

If you want I can post this comment on the chairs reloaded plugin page

commented

Comment by me4502

It may be best to link this issue, but use that comments permalink. (http://youtrack.sk89q.com/issue/CRAFTBOOK-2645#comment=67-4432)

I'll report it to bukkit, thanks for testing.

commented

Comment by me4502

Bukkit issue: https://bukkit.atlassian.net/browse/BUKKIT-4591

commented

Comment by NolanSyKinsley

Nice fix on the sitting animation BTW.

commented

Comment by me4502

If you disable NoCheatPlus, does the same issue occur? That seems to be a no cheat plus error. But the actual console errors would be useful, have you checked the server log?

If its NoCheatPlus, could you please turn on all the debug outputting to work out which checks chairs set off? That way I can exempt chair players from that check.

commented

Comment by NolanSyKinsley

I checked the nocheat logs and it was not in there at all. I am downloading the server logs now, but it will take a few hours. 1.5 gigs at 150kbps >.< I will see if I can find what plugin is catching it. I will also enable nocheat debug just in case.

commented

Comment by NolanSyKinsley

Aha, it is bukkit itself. I found a commit regarding the snippet of code that handles it, sending the player back to spawn on login when this event is triggered.

Bukkit/CraftBukkit@a7a7621

In the newer code it is here:

https://github.com/Bukkit/CraftBukkit/blob/master/src/main/java/net/minecraft/server/PlayerConnection.java#L254

commented

Comment by NolanSyKinsley

ok, new development, it is happening every time now in certain areas. No errors in the console. The arrow that is used to make the sitting posture seems to still be in the world from one of my previous chairs, idk if this could be causing and issue, but I want to cover all bases. It seems to vanish, but I log out and back in and it is still there. The arrow is left when the block is broken after someone is kicked with this error, or they log out while seated, these phantom arrows seem to be permanent.

From what I can tell from the code, the only thing that could be causing the kick is a NaN exception in the flying packet, my hunch is the stance portion of the packet.

The first time it happened a restart fixed it for a period. Now a restart does not. Trying to pin down the cause is getting stranger by the minute. Now I have it happening in only a specific level of the world, around 108 blocks high.

Sorry for the influx of info, this is just confusing.

commented

Comment by me4502

Hmm... Does this happen with OP's also?

commented

Comment by NolanSyKinsley

Yes it does, I am OP. I found some more info, and funny enough, regards riding an arrow, idk how much it will help, it is a bit old and a little hackish:
https://forums.bukkit.org/threads/disconnected-by-server-nope.17276/

commented

Comment by me4502

Hmm, I'm not sure if that approach still works, as I had a plugin I made a few years ago that did that, but it broke

commented

Comment by me4502

Please try with the latest build. I am unable to cause this issue on that build.

commented

Comment by Richard.Arkless

I can also confirm this issue

I have tried the latest build and while before it wouldn't kick me if I right clicked (instead of pressing shift) the chair but now even that has stopped working

commented

Comment by me4502

So right clicking doesn't do anything? I have tested this on two servers, one with just craftbook and WorldEdit, the other a production server with a lot of plugins, and I can't reproduce it on either servers. What plugins do you have? One may be interfering with arrows. Do you have anything like NoLagg or PTweaks?

commented

Comment by me4502

Someone told me md_5 fixed this in spigot, is that true? Can't test right now.

commented

Comment by Richard.Arkless

Will test now

EDIT: Just tried and still getting kicked with the nope error message, can you find out what build of spigot this is supposedly fixed in as ive tried the last 3 and nothing

commented

Comment by me4502

Hmm, I'll ask.. But what I heard was a spigot build fixed players having a NaN velocity value, which is similar to this issue, but not exactly the issue (I thought that may cause this), looks like it isn't fixed.

commented

Comment by Richard.Arkless

For the fun of it I took the EntityHuman.class and EntityPlayer.class from Bukkit build 2812 and put it in the latest build of bukkit and found that I could now sit without it kicking me (I ruled out the entity.class and PathfinderGoalTame.class).

Does anything rely on the changes which could affect the stability?

commented

Comment by me4502

I wouldn't recommend doing that, if they've made any changes it could crash the server when the code is called

commented

Comment by Richard.Arkless

Thanks, it really is aggravating because it is one of the most loved features among my server community but am forced to stay on an old version of bukkit until they or spigot fixes

commented

Comment by me4502

Were you able to work out which class had the issue in it out of EntityHuman and EntityPlayer? That may be helpful to the bukkit team to resolve the issue.

commented

Comment by Richard.Arkless

It appears that something in EntityHuman is what breaks chairs

I think im going to compile my own version of EntityHuman to find out which part of the code breaks it

commented

Comment by Richard.Arkless

ok so if I uncomment this.vehicle = null; in line 319 of EntityHuman then chairs work

commented

Comment by me4502

Hmm,that line sets the vehicle to null though, it may cause memory leaks

commented

Comment by Богдан.Шкляренко

http://dev.bukkit.org/bukkit-plugins/chairsreloaded/

They Did it!

commented

Comment by me4502

Fixed.

commented

Comment by Richard.Arkless

Just tried it out and found a small bug, it wont allow me to sit until after I press the shift button

commented

Comment by me4502

Hmm.. That's odd, I'll test this afternoon

commented

Comment by Богдан.Шкляренко

Press RMS (Right Mouse Key) - there is small Chance too sit
Press Shift, then RMS - the same
Press and hold RMS and then ckick shift - 100% chance too sit o_o

commented

Comment by Богдан.Шкляренко

sometimes arrows drops to my inventory, and CB spawns new arrows. Arrow dupe :D

commented

Comment by me4502

Hmm, the arrows aren't actual server side entities, there should be no way they actually spawn in the inventory.

Also, CraftBook won't allow the user to sit if they are holding sneak - that is a client side bug, or a conflict with another plugin.

commented

Comment by Richard.Arkless

I didn't do much, you did most of the work.

Ive made a comment on Chairs Reloaded linking to this page and also the bukkit jira page so they can track the progress

http://dev.bukkit.org/bukkit-plugins/chairsreloaded/?comment=473

commented

Comment by Richard.Arkless

ok an update on this while 2812 fixed most of the crashes it will still kick you if there is a wall in the way of where it wants to place you when you want to get off the chair.

In case you dont understand here is a video demonstrating it: http://youtu.be/n9N17OrQJp8

One workaround is that you can have it place the player in front of the chair he was sitting on or if all the sides are blocked off then place the player on top

commented

Comment by me4502

The issue is CraftBook can't change where the player is placed. That is a vanilla minecraft mechanic that can't be changed.

commented

Comment by Richard.Arkless

ok, I wasn't sure if this was something you had implemented or not. Thanks for replying to my comment so quickly

commented

Comment by Богдан.Шкляренко

So? We must wait for bukkit/spigot fix it or it`s end of chairs function?

commented

Comment by Richard.Arkless

My recommendation is to downgrade to bukkit version 2812 as chairs work fine with this build. It is all the builds after that which have problems

commented

Comment by bobeeb

craftbook 3.7 still crashes the client when you try to sit

2013-08-02 19:46:26 [SEVERE] someuser was caught trying to crash the server with an invalid position.
2013-08-02 19:46:26 [INFO] someuser left the game.

craftbulkkit 2826
craftbook 3.7
WorldGuard v928-4acef77
WorldEdit v1437-d61dec2

commented

Comment by Richard.Arkless

Neils this bug has yet to be fixed (I will try and comment when it does get fixed)

I suggest you either do as I recommended in my previous comment or disable chairs and wait until bukkit actually fixes the problem (Which may be never)

commented

Comment by me4502

This won't be fixed in a craftbook update because it isn't a craftbook issue.

commented

Comment by Богдан.Шкляренко

Hmmm Bukkit and Spigot won`t use your commit?

commented

Comment by me4502

I haven't submitted any code to them, just the issue. I haven't had time to look into it on their side.

commented

Comment by Богдан.Шкляренко

It`s Never be fixed :c
maybe there is another way to do it?

commented

Comment by me4502

The bukkit team are looking into it.

commented

Comment by jjkrause

Ok, works with the latest build... I was running your last recommended build. Sorry to interrupt... :)

commented

Comment by me4502

It's all fine, I'm happy chairs work.

commented

Comment by jjkrause

Quick question, did you change the MC1421 clock IC? Its always self-triggered, even without the S. ([MC1421] is self triggered...)

commented

Comment by me4502

Didn't change it, it's always been like that.

commented

Comment by jjkrause

Ok, the WIki talks about "non self-triggering and self triggering". I thought if I didn't include the S at the end of the IC number, it wasn't self triggering.

commented

Comment by me4502

Some IC's are always self triggering

commented

Comment by NickB

This issue has popped up for me again using the latest Craftbook dev build, latest Protocolib dev build, w/ Spigot 1.7

commented

Comment by me4502

There is nothing more I can do about this issue, I have to wait for bukkit to fix it

commented

Comment by jjkrause

Just letting you know I've been getting the "Nope!" kick message as well when using the chairs function of Craftbook. I thought the message was quite funny, but just disabled the option for now, as it is non-essential. Happy Holidays Matthew and keep up the great work on Craftbukkit.

commented

Comment by me4502

Thanks. Once bukkit has become more stable for 1.7.2, I'll try again to get the fix added.

commented

Comment by jjkrause

Just a note, we get the Nope! kick message when we press SHIFT to get up from the chair.

commented

Comment by me4502

Yeah, that's when the issue occurs. In the latest craftbook builds I've tried erasing every NaN the server recieved, but that could cause other issues with people who are actually maliciously trying it, they wouldn't get kicked. It kind of just turns off the nope kick.

commented

Comment by jjkrause

The chairs seemed to be working fine for me for a while since your last update, but now I cannot sit on them at all. It always says "This chair is too far away!" even if I'm right next or standing on it.

CB 3.8-Snapshot:3492-ebadd8a
Tested with CraftBukkit 1.7.2-R0.2 and Spigot version 1237 (API version 1.7.2-R0.3-SNAPSHOT).

commented

Comment by me4502

Set your max click radius higher for chairs.

commented

Comment by jjkrause

This what I have configured in my file. Increasing max-click-radius doesn't help...
max-distance: 3
max-click-radius: 5

commented

Comment by me4502

Odd, it works for me?

commented

Comment by jjkrause

Ok, I'll try disabling all plugins and report back.

commented

Comment by me4502

Wait, what version are you using? Try updating to a later version