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

挂一段时间出现 ExceptionInPacketCodecException(cause=java.lang.IllegalStateException: 32),然后没有响应 #1840

Closed
zhaodice opened this issue Jan 17, 2022 · 2 comments
Labels
N 优先级: 一般 t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:protocol 属性: 协议相关
Milestone

Comments

@zhaodice
Copy link
Contributor

zhaodice commented Jan 17, 2022

问题描述

挂一段时间出现 ExceptionInPacketCodecException(cause=java.lang.IllegalStateException: 32),然后没有响应

复现

1.登录2个bot(不确定是否和bot数量有关系,因为另一个同机器同版本的mirai程序2个bot非常稳定)
2.持续一段时间(大概几个小时)
3.发现bot没有响应,上服务器,发现刷了很多ExceptionInPacketCodecException(cause=java.lang.IllegalStateException: 32)

mirai-core 版本

2.9.0-RC2

bot-protocol

ANDROID_PAD

其他组件版本

No response

系统日志

Exception in coroutine 'unnamed'
ExceptionInPacketCodecException(cause=java.lang.IllegalStateException: 32)
        at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.handl
eExceptionInDecoding(NettyNetworkHandler.kt:61)
        at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler$ByteB
ufToIncomingPacketDecoder.channelRead0(NettyNetworkHandler.kt:83)
        at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler$ByteB
ufToIncomingPacketDecoder.channelRead0(NettyNetworkHandler.kt:73)
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChanne
lInboundHandler.java:99)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:357)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMes
sageDecoder.java:324)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessage
Decoder.java:296)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(Defau
ltChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChanne
lPipeline.java:919)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(Abstra
ctNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.jav
a:719)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEve
ntLoop.java:655)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.ja
va:581)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThread
EventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java
:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalR
unnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: 32
        at net.mamoe.mirai.internal.network.components.PacketCodecImpl.parseOicq
Response(PacketCodec.kt:197)
        at net.mamoe.mirai.internal.network.components.PacketCodecImpl.decodeRaw
(PacketCodec.kt:108)
        at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler$ByteB
ufToIncomingPacketDecoder.channelRead0(NettyNetworkHandler.kt:80)
        ... 23 more
        Suppressed: net.mamoe.mirai.internal.network.components.OicqDecodingExce
ption
        Caused by: [CIRCULAR REFERENCE: java.lang.IllegalStateException: 32]

网络日志

找不到文件

补充信息

貌似和 #1603 是一个问题,但他说出错还能继续收发消息,我这边出现之后直接停滞了,无法继续收发消息**(刷了若干这样的错误)**

@Him188 Him188 added N 优先级: 一般 t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:protocol 属性: 协议相关 labels Jan 20, 2022
@Him188 Him188 added this to the Backlog milestone Jan 20, 2022
@Him188
Copy link
Member

Him188 commented Jan 31, 2022

可以考虑设计一个选项, 允许在这种情况下自动重连

@Him188 Him188 modified the milestones: Backlog, 2.11 Jan 31, 2022
@Him188 Him188 modified the milestones: 2.11, 2.11.0-RC Feb 10, 2022
@Him188
Copy link
Member

Him188 commented Apr 6, 2022

7bb788a 修复了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
N 优先级: 一般 t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:protocol 属性: 协议相关
Projects
None yet
Development

No branches or pull requests

2 participants