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

Sound Error? #79

Closed
chaseking opened this issue Apr 2, 2015 · 1 comment
Closed

Sound Error? #79

chaseking opened this issue Apr 2, 2015 · 1 comment

Comments

@chaseking
Copy link

I'm testing a bot using this library on my local server. However, when this specific custom sound is sent, the connection between the bot and my local server crashes, and I get this error. How can I fix this?

[14:59:20] SOUND > Custom sound: "game.testsounds.battlelost"
[14:59:21] CONNECTION > Disconnected: Internal network exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(9) + length(1) exceeds writerIndex(9): UnpooledHeapByteBuf(ridx: 9, widx: 9, cap: 9)
[14:59:21] CONNECTION > Logging in again in 10 seconds...
[14:59:31] CONNECTION > Successfully authenticated user.
[14:59:31] CONNECTION > Connecting to local test server...
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(9) + length(1) exceeds writerIndex(9): UnpooledHeapByteBuf(ridx: 9, widx: 9, cap: 9)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:258)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:140)
    at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:74)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:138)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:317)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:154)
    at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:74)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:138)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:317)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:154)
    at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:74)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:138)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:317)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:154)
    at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:74)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:138)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:317)
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:148)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:74)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:138)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:317)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:123)
    at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:40)
    at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:38)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:794)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(9) + length(1) exceeds writerIndex(9): UnpooledHeapByteBuf(ridx: 9, widx: 9, cap: 9)
    at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1161)
    at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:563)
    at org.spacehq.packetlib.tcp.io.ByteBufNetInput.readByte(ByteBufNetInput.java:27)
    at org.spacehq.packetlib.tcp.io.ByteBufNetInput.readVarInt(ByteBufNetInput.java:60)
    at org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket.read(ServerKeepAlivePacket.java:27)
    at org.spacehq.packetlib.tcp.TcpPacketCodec.decode(TcpPacketCodec.java:42)
    at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:227)
    ... 30 more
@ghost ghost closed this as completed Jul 19, 2015
@andrewgazelka
Copy link

andrewgazelka commented Jan 8, 2017

I'm getting a similar issue
https://hastebin.com/usepecabol.sql

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants