Add some debug info for issue #109

This commit is contained in:
Dan Mulloy 2015-10-31 13:12:18 -04:00
parent cd7894f9f1
commit c40d9c1e6c

View File

@ -274,8 +274,32 @@ public class NettyProtocolInjector implements ProtocolInjector {
Class<?> clazz = packet.getClass();
if (sendingFilters.contains(clazz) || marker != null) {
try {
PacketContainer container = new PacketContainer(PacketRegistry.getPacketType(clazz), packet);
return packetQueued(container, injector.getPlayer(), marker);
} catch (LinkageError er) {
// Issue #109
if (isDebug()) {
try {
System.out.println("Encountered a LinkageError in onPacketSending");
System.out.println("injector=" + injector);
System.out.println("packet=" + packet);
System.out.println("marker=" + marker);
Thread curr = Thread.currentThread();
System.out.println("current thread=" + curr.getName());
System.out.println("class loader=" + curr.getContextClassLoader());
Class<PacketContainer> container = PacketContainer.class;
System.out.println("packet container=" + container);
System.out.println("class loader=" + container.getClassLoader());
} catch (LinkageError e1) {
e1.printStackTrace();
}
}
er.printStackTrace();
}
}
// Don't change anything