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

事件重复广播的问题仍然存在 #221

Closed
sandtechnology opened this issue Apr 11, 2020 · 1 comment
Closed

事件重复广播的问题仍然存在 #221

sandtechnology opened this issue Apr 11, 2020 · 1 comment
Assignees
Labels
C 优先级: 最高 t:bug 类型: bug x:protocol 属性: 协议相关
Milestone

Comments

@sandtechnology
Copy link
Collaborator

sandtechnology commented Apr 11, 2020

问题

刚刚就在mirai群内复现的bug,因为事件重复广播的问题导致了群成员未找到

> Bot(3068879961) 12:26:20 : Event: MemberLeaveEvent.Quit(member=Member(754734680))
> Network(3068879961) 12:26:20 : Send: OnlinePush.RespPush
> Bot(3068879961) 12:26:20 : [mirai(655057127)] (1193049506) -> [mirai:source:1784977218]山前阿姊个姬器宁 滚蛋了
> Network(3068879961) 12:26:26 : Event: net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPushNotify@36736982
> Network(3068879961) 12:26:26 : Send: MessageSvc.PbGetMsg
> Bot(3068879961) 12:26:26 : Event: Active(member=Member(754734680))
> Bot(3068879961) 12:26:26 : [mirai(655057127)] (1193049506) -> [mirai:source:152884172]欢迎 山前阿姊个姬器宁 
> Bot(3068879961) 12:26:28 : [mirai(655057127)] (1193049506) -> [mirai:source:784277325]山前阿姊个姬器宁 滚蛋了
> Bot(3068879961) 12:26:28 : Event: MemberLeaveEvent.Quit(member=Member(754734680))
> Network(3068879961) 12:26:28 : Send: OnlinePush.RespPush
> Network(3068879961) 12:26:37 : Send done: Heartbeat.Alive
> Network(3068879961) 12:26:37 : Event: Heartbeat.Alive.Response
> Bot(3068879961) 12:26:38 : [mirai(655057127)] ...(1846913566) -> [mirai:source:692939947][mirai:at:1040400290] [mirai:image:{BCB08495-3F24-E351-C5AA-66B26E8BBEA9}.jpg]
> Bot(3068879961) 12:26:54 : [mirai(655057127)] ...(1846913566) -> [mirai:source:1190909219]botPermssion 没 init 吗
> Bot(3068879961) 12:26:58 : [mirai(655057127)] 垃圾 Kotlin(1040400290) -> [mirai:source:1929484418]0.36.1
> java.util.NoSuchElementException: member 754734680 not found in group 655057127
> 	at net.mamoe.mirai.qqandroid.contact.GroupImpl.get(GroupImpl.kt:246)
> 	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePush$PbPushGroupMsg.decode(OnlinePush.kt:85)
> 	at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core_qqandroid(PacketFactory.kt:491)
> 	at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:224)
> 	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:392)
> 	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:387)
> 	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:372)
> 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
> 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
> Bot(3068879961) 12:27:01 : [mirai(655057127)] 垃圾 Kotlin(1040400290) -> [mirai:source:1151423915]修了这个问题
> Bot(3068879961) 12:27:05 : [mirai(655057127)] saeziae(1405538335) -> [mirai:source:564060962]qwq
> java.util.NoSuchElementException: member 754734680 not found in group 655057127
> 	at net.mamoe.mirai.qqandroid.contact.GroupImpl.get(GroupImpl.kt:246)
> 	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePush$PbPushGroupMsg.decode(OnlinePush.kt:85)
> 	at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core_qqandroid(PacketFactory.kt:491)
> 	at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:224)
> 	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:392)
> 	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:387)
> 	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:372)
> 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
> 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
> 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
> 

如何复现

让某个群成员退群再进群

@sandtechnology sandtechnology added the t:bug 类型: bug label Apr 11, 2020
@Him188
Copy link
Member

Him188 commented Apr 11, 2020

??都已经有sequence缓存了,除非服务器把这个包发了三次

@Him188 Him188 added C 优先级: 最高 x:protocol 属性: 协议相关 labels Apr 11, 2020
@Him188 Him188 self-assigned this Apr 11, 2020
@Him188 Him188 added this to the mirai-core 1.0.0 milestone Apr 11, 2020
@Him188 Him188 closed this as completed in 0dfea06 Apr 11, 2020
Him188 pushed a commit that referenced this issue Jan 27, 2021
- Make StopCommand async
- Close terminal reader only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C 优先级: 最高 t:bug 类型: bug x:protocol 属性: 协议相关
Projects
None yet
Development

No branches or pull requests

2 participants