bergerkiller / BKCommonLib

An extensive library I use in all of my plugins
38 stars 38 forks source link

Spoutcraft Clients cant connect, Weird String Error #6

Closed Inscrutable closed 9 years ago

Inscrutable commented 11 years ago

Server is using Spigot 607, BKCommonlib build 162, NoLagg 1.89.8 build 64, ProtocolLib 2.3.0 (b47), SpoutPlugin build 1433 (and more plugins). Spoutcraft clients cannot login, they get the message below instead. (FYI BKCommonlib b148 and Nolagg b57 do not cause this issue.)

2013/03/09 13:54:31 [INFO] Connecting to 192.168.1.150, 25565 2013/03/09 13:54:37 [SEVERE] java.io.IOException: Received string length is less than zero! Weird string! 2013/03/09 13:54:37 [SEVERE] at ef.a(Packet.java:186) 2013/03/09 13:54:37 [SEVERE] at dj.a(SourceFile:17) 2013/03/09 13:54:37 [SEVERE] at ef.a(Packet.java:140) 2013/03/09 13:54:37 [SEVERE] at cg.i(TcpConnection.java:293) 2013/03/09 13:54:37 [SEVERE] at cg.c(TcpConnection.java:473) 2013/03/09 13:54:37 [SEVERE] at ch.run(SourceFile:93) 2013/03/09 13:54:38 [INFO] [Spoutcraft Cache Manager] - Starting: 1362797678951 2013/03/09 13:54:39 [INFO] Detected SpoutPlugin enabled server. 2013/03/09 13:54:40 [INFO] disconnect.genericReason 2013/03/09 13:54:49 [INFO] Connecting to 192.168.1.150, 25565 2013/03/09 13:54:51 [SEVERE] java.io.IOException: Received string length is less than zero! Weird string! 2013/03/09 13:54:51 [SEVERE] at ef.a(Packet.java:186) 2013/03/09 13:54:51 [SEVERE] at dj.a(SourceFile:17) 2013/03/09 13:54:51 [SEVERE] at ef.a(Packet.java:140) 2013/03/09 13:54:51 [SEVERE] at cg.i(TcpConnection.java:293) 2013/03/09 13:54:51 [SEVERE] at cg.c(TcpConnection.java:473) 2013/03/09 13:54:51 [SEVERE] at ch.run(SourceFile:93)

lenis0012 commented 11 years ago

This has been fixed in later versions of BKCommonLib Please sue ProtocolLib though

Inscrutable commented 11 years ago

The latest version of BKCommonlib IS build 162 as of this writing :/ I will wait for a new release then. (ProtocolLib 2.3.0-Snapshot and earlier works ok with BKCL build 148) ... Should I nag them?

lenis0012 commented 11 years ago

I se BKCommonLib 1.50 and ProtocolLib 2.2.0

They work fine together its probably spout.

Ill ask bergerkiller

bergerkiller commented 11 years ago

@BlackGoat Are you absolutely sure this is caused by BKCommonLib? Did you try without NoLagg? And what about without both NoLagg and BKCommonLib? I can not trace the cause back to anything, as neither plugins deal with login packets. It can only be caused by ProtocolLib in this case.

aadnk commented 11 years ago

@bergerkiller : On Spigot, ProtocolLib is merely acting as a wrapper for org.spigotmc.netty.PacketListener - it doesn't perform any risky injection magic as on CraftBukkit.

I think it's more likely an issue with Netty. Perhaps BkCommonLib or NoLagg is writing directly to a socket output stream somewhere? This might break if a player is no longer connected through a normal socket.

bergerkiller commented 11 years ago

@aadnk No, when ProtocolLib is enabled it will redirect all calls from within a ProtocolLib packetlistener to BKCommonLib. The player connection is not replaced, at all, and no risky things are done.

So then maybe spigot has an error in their listener somewhere?

lenis0012 commented 11 years ago

@aadnk Could be the issue, Bergerkiller is the one who should know where it uses direct writing.

Inscrutable commented 11 years ago

Everything works as it should until I add NoLagg (build 64), then spoutcraft gets weird packets. (BKCL & ProtocolLib seem to work happily together on Spigot without NoLagg). I tried the latest update to ProtocolLib (2.3.1) with latest NoLagg/BKCL, got the same weird string issue. (Without Nolagg & BKCL I don't need ProtocolLib anyway).