Code Monkey home page Code Monkey logo

miraicp's Introduction

Hi, here is Eritque arcus

Hi~ o( ̄▽ ̄)ブ

This name means rainbow in the Latin

  • Pronouns: he / him or whatever you like
  • Website: blog
  • Avatar: Bocchi the Rock!
  • Currently interested in: Cyber-security / some Math
  • gpg public key 9730B8A309873B06A6301855B95AA12EA8C8C3AE

Focusing projects

💡 Projects ⭐ Stars 🛎 Issues
PyCJSON GitHub stars GitHub issues

Common using languages:

Priv Key:


One moment please...

miraicp's People

Contributors

antares0982 avatar dependabot-preview[bot] avatar dependabot[bot] avatar nambers avatar nenesekai avatar shuli106 avatar zipper-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

miraicp's Issues

发送群消息异常

Describe the bug 描述出现的异常(实际行为和预期行为)
群消息:
超过四个字母长度的消息控制台显示已发送,但手机qq并未有相关消息显示。其他类型消息正常发送。
用手机qq可以正常发送消息。写插件期间为了测试有频繁登陆
运行环境:
win10,openjdk16.0.2
IDE:
vs2020

  • MiraiCP版本: MiraiCP-loader-2.7-RC-dev5
    具体日志:
    2021-08-19 18:23:01 V/Bot 2815944970: [hlll、范钜忘] hlll -> test
    2021-08-19 18:23:04 I/MiraiCP: Send message for Group() is azaz
    2021-08-19 18:23:04 V/Bot 2815944970: Event: GroupMessagePreSendEvent(target=Group(), message=azaz)
    2021-08-19 18:23:04 V/Net 2815944970: Send: MessageSvc.PbSendMsg(MessageSvc.PbSendMsg)
    2021-08-19 18:23:04 V/Net 2815944970: Recv: MessageSvc.PbSendMsg
    2021-08-19 18:23:07 V/Bot 2815944970: Group() <- azaz
    2021-08-19 18:23:07 V/Bot 2815944970: Event: GroupMessagePostSendEvent(target=Group(), message=azaz, exception=
    null, receipt=net.mamoe.mirai.message.MessageReceipt@33772895)

构建内核

目前Plugin和Loader里基本重复,可把里面的内容提取出来构成jar内核包从而减轻同步更改的工作量,且使得热更新成为可能

优化多线程支持

因为要线程间互不干扰,所以线程中可能不能使用genv全局env,因为有风险

  1. 线程可能在主线程执行完后还执行,而主线程执行完后genv失效,无法确保主线程可以正确执行
  2. 如果覆盖genv,主线程可能在线程执行完后继续执行(如用.join()),那genv在线程执行完后就失效,无法确保主线程后的内容正确执行

所以在v2.5.0-patch-1中,线程最好手动传入env参数而不是使用genv,接下来会想办法简化

如何发送Emoji表情?

e.group.SendMsg("\uD83D\uDE03");

我按照例子写的代码,直接就报错了EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) at pc=0x00007fff8c1f3b19, pid=8456, tid=13796

Desktop (please complete the following information): 描述本地运行环境

  • JavaVersion 16.0.1
  • MiraiVersion Mirai版本 [v2.6.3]

插件权限

目前设想为做成一个json文件,一开始是配置通用权限,如是否处理群消息/私聊消息
不过预测需求不会很多,该feature的优先级暂时不会很高
可以作为可选的改进

敏感api支持

考虑要不要支持敏感api,如在插件中增加登录bot和加载插件api
需求应该不是很大,优先级不会很高
可选发展

减少JNI接口

目前kt - > C++ 接口倒是只有3个
需要把C++ -> kt 接口大幅减小以便后续维护

loader 更新程序

目前设想为单独的一个exe程序,运行后下载jar和更新bat文件, 然后重启

支持滑块

目前Plugin可以在mcl里和滑块配合使用,loader还需把滑块模块内置

插件响应消息的延迟变长

三番五次打扰大佬十分抱歉!但是我又遇到了奇怪的事了Orz

Describe the bug 描述出现的异常(实际行为和预期行为)
在开机一段时间后,会不规律的出现消息响应速度变慢的现象,与#76的表现有所区别,具体表现为:
消息被MCL接收并显示在窗体上后,到插件成功发送回复消息,二者之间需要花费数分钟。
为了确定是否是插件本身的问题我在插件的监听群消息下的第一行写了一个logger->info(),结果是在MCL接收到消息数分钟后logger才出现在MCL窗体上,而在几十毫秒后消息被发送出去。
这个情况出现得很不规律,有时几天不出现,有时连续几天出现,大都出现在晚上,出现问题时尝试使用/stop关闭MCL但是失败了(见下),右上角强制关闭后再启动MCL,有时这个问题就消失了,有时这个问题仍然存在(因为复现困难难以统计,但是感觉是关闭的时间长一点会让这个问题消失,如果关闭立刻再启动的话问题就还在
然后我编辑miraicp.json将线程数提高,试图解决这个问题,没有成功

{
 	"config": {
 		"threadNum": 20
	},
 	"pluginConfig": [
 		{
 			"path": ".\\data\\miraiCP\\MiraiCP.dll"
		}
	]
}

在这个情况出现时,尝试使用/stop停止MCL,会有如下的情况,看起来像是插件仍然在试图发送消息

Screenshots 相关代码和日志截图或复制上来

2021-09-07 17:05:00 V/Bot.3457317465: [白给幼儿园(779751178)] 溶けた雪(2603549047) -> 不占那真的起飞
> /stop
Stopping mirai-console
2021-09-07 17:05:20 I/MiraiCP: Send message for Group(235010049) is 普立德?柯里昂进行敏捷检定: D100=60/70 好,成功了
2021-09-07 17:05:20 V/Bot.3457317465: Event: GroupMessagePreSendEvent(target=Group(235010049), message=普立德?柯里昂进行敏捷检定: D100=60/70 好,成功了)
2021-09-07 17:05:20 V/Bot.3457317465: Group(235010049) <- 普立德?柯里昂进行敏捷检定: D100=60/70 好,成功了
2021-09-07 17:05:20 V/Bot.3457317465: Event: GroupMessagePostSendEvent(target=Group(235010049), message=普立德?柯里昂进 行敏捷检定: D100=60/70 好,成功了, exception=java.util.concurrent.CancellationException: SelectorNetworkHandler is already closed, receipt=null)
2021-09-07 17:05:20 I/stdout: SelectorNetworkHandler is already closed
2021-09-07 17:05:20 I/stdout: {"data":{"miraiCode":false,"retryTime":3,"source":"{\"contact\":{\"botid\":3457317465,\"groupid\":0,\"id\":235010049,\"nickornamecard\":\"20世纪欧洲列车旅行团\",\"type\":2},\"content\":\"普立德?柯里昂进行敏捷检定: D100=60/70 好,成功了\"}"},"type":1}
2021-09-07 17:05:20 W/stderr: java.util.concurrent.CancellationException: SelectorNetworkHandler is already closed
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.network.handler.selector.SelectorNetworkHandler.sendAndExpect$suspendImpl(SelectorNetworkHandler.kt:110)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.network.handler.selector.SelectorNetworkHandler.sendAndExpect(SelectorNetworkHandler.kt)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.network.handler.NetworkHandler.sendAndExpect(NetworkHandler.kt:173)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.network.handler.NetworkHandler.sendAndExpect$default(NetworkHandler.kt:169)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.contact.SendMessageHandler.sendMessagePacket(SendMessageHandler.kt:137)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.contact.SendMessageHandlerKt.sendMessageImpl(SendMessageHandler.kt:331)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.contact.SendMessageHandlerKt.sendMessage(SendMessageHandler.kt:307)
2021-09-07 17:05:20 W/stderr:   at net.mamoe.mirai.internal.contact.GroupImpl.sendMessage(GroupImpl.kt:149)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.PublicShared.send0(PublicShared.kt:193)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.PublicShared.SendMsg(PublicShared.kt:215)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib$Companion$KSend$1.invokeSuspend(CPP_lib.kt:105)
2021-09-07 17:05:20 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib$Companion.KSend(CPP_lib.kt:91)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib$Companion.KOperation(CPP_lib.kt:357)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib.KOperation(CPP_lib.kt)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib.Event(Native Method)
2021-09-07 17:05:20 W/stderr:   at tech.eritquearcus.miraicp.shared.UlitsKt$Event$$inlined$runInTP$1.invoke(Ulits.kt:72)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:46)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:38)
2021-09-07 17:05:20 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-09-07 17:05:20 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2021-09-07 17:05:20 W/stderr:   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2021-09-07 17:05:20 W/stderr:   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2021-09-07 17:05:20 W/stderr:   at java.base/java.lang.Thread.run(Unknown Source)
2021-09-07 17:05:20 E/MiraiCP: MiraiCP error:MiraiCP内部无法预料的错误:reach a error area, Contact::SendMiraiCode

描述本地运行环境
版本:

  • [ 'x'] plugin
  • loader
  • MiraiCP版本: v2.7.0

执行member.kick("")时报错

Describe the bug 描述出现的异常(实际行为和预期行为)
执行member.kick("")时报错
Screenshots 相关代码和日志截图或复制上来
image


描述本地运行环境
版本:2.7.0

  • plugin
  • loader
  • MiraiCP版本: v2.7.0

Bug

是编译后有个cpp.dll 之后放在dll目录中吗
但好像好像没有什么用

插件信息

规范化插件信息,如:

  • 插件名称
  • 插件描述
  • 联系方式(optional)
  • 默认dataFolder文件夹
  • 更规范的logger输出前缀

撤回消息

通过传递MessageSource的序列化到string传递到C++部分以实现MessageSource.recall()

消息上下文

内置传入上下文功能
初拟为JsonObject属性,用getContext()获取,在event中传入
在之后如果可以同时加载多个插件还可以用这个实现消息互通

quit()报错

Describe the bug 描述出现的异常(实际行为和预期行为)
在调用e.group.quit()之后报错,如下
Screenshots 相关代码和日志截图或复制上来

2021-09-07 12:06:41 I/stdout: JSONObject["source"] not found.
2021-09-07 12:06:41 I/stdout: {"data":{"contactSource":"{"botid":3457317465,"groupid":0,"id":90,"nickornamecard":"柴家","type":2}","quit":true},"type":2}
2021-09-07 12:06:41 W/stderr: org.json.JSONException: JSONObject["source"] not found.
2021-09-07 12:06:41 W/stderr: at org.json.JSONObject.get(JSONObject.java:572)
2021-09-07 12:06:41 W/stderr: at org.json.JSONObject.getString(JSONObject.java:859)
2021-09-07 12:06:41 W/stderr: at tech.eritquearcus.miraicp.shared.CPP_lib$Companion.KOperation(CPP_lib.kt:363)
2021-09-07 12:06:41 W/stderr: at tech.eritquearcus.miraicp.shared.CPP_lib.KOperation(CPP_lib.kt)
2021-09-07 12:06:41 W/stderr: at tech.eritquearcus.miraicp.shared.CPP_lib.Event(Native Method)
2021-09-07 12:06:41 W/stderr: at tech.eritquearcus.miraicp.shared.UlitsKt$Event$$inlined$runInTP$1.invoke(Ulits.kt:72)
2021-09-07 12:06:41 W/stderr: at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:46)
2021-09-07 12:06:41 W/stderr: at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
2021-09-07 12:06:41 W/stderr: at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:38)
2021-09-07 12:06:41 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-09-07 12:06:41 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2021-09-07 12:06:41 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2021-09-07 12:06:41 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2021-09-07 12:06:41 W/stderr: at java.base/java.lang.Thread.run(Unknown Source)
2021-09-07 12:06:41 E/MiraiCP: MiraiCP error:MiraiCP内部无法预料的错误:

除此之外还有几个经常出现但没有导致程序崩溃的错误想问一下大佬
1.

2021-09-06 20:58:18 E/MiraiCP: json格式化异常,位置C-Handle
2021-09-06 20:58:18 E/MiraiCP: {"botid":35,"from":{"botid":3457317465,"groupid":946029643,"id":843168503,"nickornamecard":"云屾","type":3},"tyoe":13,"type":null}
2021-09-06 20:58:18 E/MiraiCP: [json.exception.type_error.302] type must be number, but is null

2021-09-06 20:58:32 W/stderr: org.json.JSONException: JSONObject["source"] not found.
2021-09-06 20:58:32 W/stderr: at org.json.JSONObject.get(JSONObject.java:572)
2021-09-06 20:58:32 W/stderr: at org.json.JSONObject.getString(JSONObject.java:859)
2021-09-06 20:58:32 W/stderr: at tech.eritquearcus.miraicp.shared.CPP_lib$Companion.KOperation(CPP_lib.kt:363)
2021-09-06 20:58:32 W/stderr: at tech.eritquearcus.miraicp.shared.CPP_lib.KOperation(CPP_lib.kt)
2021-09-06 20:58:32 W/stderr: at tech.eritquearcus.miraicp.shared.CPP_lib.Event(Native Method)
2021-09-06 20:58:32 W/stderr: at tech.eritquearcus.miraicp.shared.UlitsKt$Event$$inlined$runInTP$1.invoke(Ulits.kt:72)
2021-09-06 20:58:32 W/stderr: at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:46)
2021-09-06 20:58:32 W/stderr: at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
2021-09-06 20:58:32 W/stderr: at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:38)
2021-09-06 20:58:32 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-09-06 20:58:32 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2021-09-06 20:58:32 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2021-09-06 20:58:32 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2021-09-06 20:58:32 W/stderr: at java.base/java.lang.Thread.run(Unknown Source)
2021-09-06 20:58:32 E/MiraiCP: MiraiCP error:MiraiCP内部无法预料的错误:

2021-09-06 20:56:03 E/miraiCP: Exception in coroutine Plugin miraiCP of miraiCP
kotlinx.serialization.SerializationException: Class 'ForwardMessageInternal' is not registered for polymorphic serialization in the scope of 'SingleMessage'.
Mark the base class as 'sealed' or register the serializer explicitly.
at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:102)
at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:113)
at kotlinx.serialization.PolymorphicSerializerKt.findPolymorphicSerializer(PolymorphicSerializer.kt:96)
at kotlinx.serialization.json.internal.PolymorphicKt.findActualSerializer(Polymorphic.kt:29)
at kotlinx.serialization.json.internal.PolymorphicKt.access$findActualSerializer(Polymorphic.kt:1)
at kotlinx.serialization.json.internal.StreamingJsonEncoder.encodeSerializableValue(StreamingJsonEncoder.kt:214)
at kotlinx.serialization.encoding.AbstractEncoder.encodeSerializableElement(AbstractEncoder.kt:80)
at kotlinx.serialization.internal.ListLikeSerializer.serialize(CollectionSerializers.kt:69)
at net.mamoe.mirai.message.data.MessageChain$Serializer.serialize(MessageChain.kt:266)
at net.mamoe.mirai.message.data.MessageChain$Serializer.serialize(MessageChain.kt:261)
at kotlinx.serialization.json.internal.StreamingJsonEncoder.encodeSerializableValue(StreamingJsonEncoder.kt:211)
at kotlinx.serialization.encoding.AbstractEncoder.encodeSerializableElement(AbstractEncoder.kt:80)
at net.mamoe.mirai.internal.message.MessageSourceSerializerImpl$SerialData$$serializer.serialize(MessageSerializersImpl.kt:41)
at net.mamoe.mirai.internal.message.MessageSourceSerializerImpl$SerialData$$serializer.serialize(MessageSerializersImpl.kt:41)
at net.mamoe.mirai.internal.message.MessageSourceSerializerImpl$special$$inlined$map$1.serialize(Serialization.kt:70)
at net.mamoe.mirai.internal.message.MessageSourceSerializerImpl.serialize(MessageSerializersImpl.kt)
at net.mamoe.mirai.internal.message.MessageSourceSerializerImpl.serialize(MessageSerializersImpl.kt:28)
at kotlinx.serialization.json.internal.StreamingJsonEncoder.encodeSerializableValue(StreamingJsonEncoder.kt:211)
at kotlinx.serialization.json.Json.encodeToString(Json.kt:80)
at tech.eritquearcus.miraicp.shared.PublicShared$onEnable$2.invokeSuspend(PublicShared.kt:921)
at tech.eritquearcus.miraicp.shared.PublicShared$onEnable$2.invoke(PublicShared.kt)
at tech.eritquearcus.miraicp.shared.PublicShared$onEnable$2.invoke(PublicShared.kt)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invokeSuspend(EventChannel.kt:432)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt)
at net.mamoe.mirai.internal.event.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:50)
at net.mamoe.mirai.internal.event.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at net.mamoe.mirai.internal.event.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at net.mamoe.mirai.internal.event.Handler.onEvent(InternalEventListeners.kt:50)
at net.mamoe.mirai.internal.event.InternalEventListenersKt.process(InternalEventListeners.kt:160)
at net.mamoe.mirai.internal.event.InternalEventListenersKt.callAndRemoveIfRequired(InternalEventListeners.kt:109)
at net.mamoe.mirai.event._EventBroadcast.broadcastImpl(Event.kt:174)
at net.mamoe.mirai.IMirai.broadcastEvent(IMirai.kt:312)
at net.mamoe.mirai.internal.MiraiImpl.broadcastEvent$suspendImpl(MiraiImpl.kt:304)
at net.mamoe.mirai.internal.MiraiImpl.broadcastEvent(MiraiImpl.kt)
at net.mamoe.mirai.event._EventBroadcast.broadcastPublic$suspendImpl(Event.kt:161)
at net.mamoe.mirai.event._EventBroadcast.broadcastPublic(Event.kt)
at net.mamoe.mirai.event.EventKt.broadcast(Event.kt:148)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$2.invokeSuspend(EventDispatcher.kt:90)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$2.invoke(EventDispatcher.kt)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$2.invoke(EventDispatcher.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:89)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast(EventDispatcher.kt)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invokeSuspend(EventDispatcher.kt:105)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invoke(EventDispatcher.kt)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invoke(EventDispatcher.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcastAsync-kKe4JaQ(EventDispatcher.kt:102)
at net.mamoe.mirai.internal.network.components.EventDispatcher.broadcastAsync-kKe4JaQ$default(EventDispatcher.kt:35)
at net.mamoe.mirai.internal.network.components.EventBroadcasterPacketHandler.impl(PacketHandler.kt:87)
at net.mamoe.mirai.internal.network.components.EventBroadcasterPacketHandler.handlePacket(PacketHandler.kt:73)
at net.mamoe.mirai.internal.network.components.PacketHandlerChain.handlePacket(PacketHandler.kt:42)
at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invokeSuspend(NetworkHandlerSupport.kt:84)
at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invoke(NetworkHandlerSupport.kt)
at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invoke(NetworkHandlerSupport.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.collectReceived$mirai_core(NetworkHandlerSupport.kt:82)
at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler$PacketDecodePipeline$2$1.invokeSuspend(NettyNetworkHandler.kt:186)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

2021-09-06 21:01:08 W/stderr: okhttp3.internal.http2.StreamResetException: stream was reset: REFUSED_STREAM
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:148)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
2021-09-06 21:01:08 W/stderr: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:502)
2021-09-06 21:01:08 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2021-09-06 21:01:08 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2021-09-06 21:01:08 W/stderr: at java.base/java.lang.Thread.run(Unknown Source)
2021-09-06 21:01:08 E/MiraiCP: MiraiCP error:MiraiCP内部无法预料的错误:

如有打扰,请谅解
十分感谢!

描述本地运行环境
版本:

  • plugin
  • loader
  • MiraiCP版本: v2.7.0

多账户登录设计漏洞

目前在本地缓存了bot实例,但在多账户登录的时候会冲突
主要在plugin中体现,因为loader现在还不支持多账户登录

收到大量消息时,在MCL使用MiraiCP插件时收到消息存在严重延迟且发送消息后报错

Describe the bug 描述出现的异常(实际行为和预期行为)
插件确定没有问题,在我自己的电脑使用只添加了一个群和两三个好友的小号进行测试,发送群聊消息延迟在3s左右,发送私聊消息延迟在1s以内
此时有一个问题:mcl偶尔会卡主,表现为在某个时间点突然收不到消息,然后再mcl窗体随意输入任何字符的那一瞬间,没有收到的消息突然就刷出来,且显示接收时间相同(实际上这些消息在QQ上并不是同时发送的),这个问题在测试时出现频率较低且没什么规律。

插件在小号上测试完毕后我在mcl上登陆了一个bot,加的群比较多,大约有500+群,消息大概每秒三四条。此时问题开始出现,我在群里发送消息后大概半分钟甚至更长时间后这条消息才显示在mcl界面上,有时还会丢失这条消息。
而在性能较低的服务器上有时一分钟以上才能接收到消息
而在接收到消息后,发送消息时那个问题又出现了。下面是其中的一次的情况,这个问题很容易复现,如果还需要其他例子,我可以提供。
Screenshots 相关代码和日志截图或复制上来
If applicable, add screenshots to help explain your problem.
2021-08-23 16:18:06 V/Bot.3457317465: [Hb(94)] 不盟)(42) -> .ct
(这条消息其实是我在16:17:32时发送的)
2021-08-23 16:18:08 I/MiraiCP: Send message for Group(94) is 品味生活!已为不盟)调好最合适的饮品:
Mimosa(含羞草) 6.50%Vol.
世上有多少种水果,就有多少种含羞草
开胃,发泡,清爽
描述仅供参考
2021-08-23 16:18:08 V/Bot.35: Event: GroupMessagePreSendEvent(target=Group(94), message=品味生活!已为不 盟)调好最合适的饮品:
Mimosa(含羞草) 6.50%Vol.
世上有多少种水果,就有多少种含羞草
开胃,发泡,清爽
描述仅供参考)
2021-08-23 16:18:09 V/Bot.3
5: [犬厅(10)] Fk(38) -> [mirai:image:{C4616713-4CD1-0616-FB55-99EC6FC9CC64}.jpg]
2021-08-23 16:18:13 V/Bot.35: Event: Dropped(bot=Bot(35), cause=HeartbeatFailedException: AliveHeartbeat, recoverable=true, cause=PacketTimeoutException(message=Timeout receiving Heartbeat response, cause=kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 5000 ms))
2021-08-23 16:18:14 V/Bot.35: [沈锤(16)] 反徒(17) -> 两个6联旋风热熔
2021-08-23 16:18:18 V/Bot.3
5: [被*****)(62)] 加子(18) -> [mirai:quote:[17],[18]][mirai:at:58] 问题不大,群里比你怪的也有
2021-08-23 16:18:18 V/Bot.35: Group(94) <- 品味生活!已为不盟)调好最合适的饮品:\nMimosa(含羞草) 6.50%Vol.\n世上有多少种水果,就有多少种含羞草\n开胃,发泡,清爽\n描述仅供参考
2021-08-23 16:18:18 W/Bot.3
5: Connection lost, reconnecting... (HeartbeatFailedException: AliveHeartbeat, recoverable=true, cause=PacketTimeoutException(message=Timeout receiving Heartbeat response, cause=kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 5000 ms))
2021-08-23 16:18:18 V/Bot.35: Event: GroupMessagePostSendEvent(target=Group(94), message=品味生活!已为不盟)调好最合适的饮品:
Mimosa(含羞草) 6.50%Vol.
世上有多少种水果,就有多少种含羞草
开胃,发泡,清爽
描述仅供参考, exception=kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 5000 ms, receipt=null)
2021-08-23 16:18:18 I/stdout: Timed out waiting for 5000 ms
2021-08-23 16:18:18 I/stdout: {"data":{"miraiCode":false,"source":"{"contact":{"botid":3
5,"groupid":0,"id":94,"nickornamecard":"Hb","type":2},"content":"品味生活!已为不盟)调好最 合适的饮品:\nMimosa(含羞草) 6.50%Vol.\n世上有多少种水果,就有多少种含羞草\n开胃,发泡,清爽\n描述仅供参考"}"},"type":1}
2021-08-23 16:18:18 W/stderr: kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 5000 ms
2021-08-23 16:18:18 W/stderr: at kotlinx.coroutines.TimeoutKt.TimeoutCancellationException(Timeout.kt:186)
2021-08-23 16:18:18 W/stderr: at kotlinx.coroutines.TimeoutCoroutine.run(Timeout.kt:156)
2021-08-23 16:18:18 W/stderr: at kotlinx.coroutines.EventLoopImplBase$DelayedRunnableTask.run(EventLoop.common.kt:497)
2021-08-23 16:18:18 W/stderr: at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
2021-08-23 16:18:18 W/stderr: at kotlinx.coroutines.DefaultExecutor.run(DefaultExecutor.kt:69)
2021-08-23 16:18:18 W/stderr: at java.base/java.lang.Thread.run(Unknown Source)
2021-08-23 16:18:18 E/MiraiCP: MiraiCP error:MiraiCP内部无法预料的错误:reach a error area, Contact::SendMiraiCode
2021-08-23 16:18:18 V/Bot.3
5: [C组(73)] 群往(88) -> 也可能大家只看见一张嘴连着个胃?
2021-08-23 16:18:18 I/Bot.35: Saved account secrets to local cache for fast login.
2021-08-23 16:18:18 I/Bot.3
5: Login successful.
2021-08-23 16:18:18 V/Bot.35: Event: BotOnlineEvent(bot=Bot(35))
2021-08-23 16:18:18 I/Bot.35: LMT白名单读取完成
2021-08-23 16:18:18 I/Bot.3
5: LMT列表读取完成
2021-08-23 16:18:18 I/Bot.35: 全局昵称读取完成
2021-08-23 16:18:18 I/Bot.3
5: 群组昵称读取完成
2021-08-23 16:18:18 I/Bot.35: 关闭群列表读取完成
2021-08-23 16:18:18 I/Bot.3
5: 村规读取完成
2021-08-23 16:18:18 I/Bot.35: 目前以名称检索的酒品名单上的酒品分别有这么多:157 157
2021-08-23 16:18:18 V/Bot.3
5: Event: BotReloginEvent(bot=Bot(35), cause=null)
2021-08-23 16:18:18 I/Bot.3
5: Reconnected successfully in 0.287s.
2021-08-23 16:18:19 V/Bot.35: [庸团(83)] 本红(2*****0) -> 稳妥=委托
Desktop (please complete the following information): 描述本地运行环境
版本:

  • [ 2.7RCdev5] plugin
  • [ 2.7RCdev5] loader
  • MiraiCP版本: v 2.7RCdev5

感谢大佬!
第一次发issues,如果有哪里有问题我会立刻修改的!

recall函数无法撤回图片类消息

使用recall函数撤回图片消息失败,报无法解析的json中"Image"的消息类型,怀疑可能是mirai主程序问题(但我不想看代码)

Your .dependabot/config.yml contained invalid details

Dependabot encountered the following error when parsing your .dependabot/config.yml:

The property '#/' did not contain a required property of 'update_configs'
The property '#/' contains additional properties ["updates"] outside of the schema when none are allowed
The property '#/version' value 2 did not match one of the following values: 1

Please update the config file to conform with Dependabot's specification using our docs and online validator.

C++多线程到底应该如何调用。。。

新创建的线程不能调用任何kotlin部分代码,包括logger和定时任务。

消息回调中不能执行延迟任务,所以我把延时任务放到了定时任务,但是,定时任务执行任务需要回调传递参数,用全局变量就必须加锁,但是,他们属于同一线程,后来考虑是同一携程,只使用一个变量来协调公共资源访问还是会出问题。

尝试多线程后,新开的工作线程没法调用这边任何的函数(包括定时任务)来帮助发送消息。甚至logger->Info执行就会直接闪退。我该如何是好。

遇到的几个小问题

大佬打扰了!
Describe the bug 出现的异常(实际行为和预期行为)

当群内被禁言或全员禁言时,尝试发送消息会导致mirai崩溃,目前使用try避免了这个问题
程序:
Group(*GroupListCut, botid).sendMsg("已经在这里摸鱼" + to_string(intLmtDayTime) + "天了,马上就会离开这里。仍有需要的话可以再次邀请");
错误信息:

2021-09-27 08:41:24 V/Bot.3457317465: Event: GroupMessagePreSendEvent(target=Group(7......5), message=已经在这里摸鱼21 天了,马上就会离开这里。仍有需要的话可以再次邀请)
2021-09-27 08:41:24 V/Bot.3457317465: Group(7......5) <- 已经在这里摸鱼21天了,马上就会离开这里。仍有需要的话可以再次邀请
2021-09-27 08:41:24 V/Bot.3457317465: Event: GroupMessagePostSendEvent(target=Group(701852575), message=已经在这里摸鱼21天了,马上就会离开这里。仍有需要的话可以再次邀请, exception=java.lang.IllegalStateException: Send message failed: MessageSvcPbSendMsg.Response.Failed(resultType=120, errorCode=0, errorMessage=), receipt=null)
2021-09-27 08:41:24 I/stdout: Send message failed: MessageSvcPbSendMsg.Response.Failed(resultType=120, errorCode=0, errorMessage=)
2021-09-27 08:41:24 I/stdout: {"data":{"miraiCode":false,"retryTime":3,"source":"{\"contact\":{\"botid\":3457317465,\"groupid\":0,\"id\":7......5,\"nickornamecard\":\"厦......群\",\"type\":2},\"content\":\"已经在这里摸鱼21天了, 马上就会离开这里。仍有需要的话可以再次邀请\"}"},"type":1}
2021-09-27 08:41:24 W/stderr: java.lang.IllegalStateException: Send message failed: MessageSvcPbSendMsg.Response.Failed(resultType=120, errorCode=0, errorMessage=)
2021-09-27 08:41:24 W/stderr:   at net.mamoe.mirai.internal.contact.SendMessageHandler.sendMessagePacket(SendMessageHandler.kt:164)
2021-09-27 08:41:24 W/stderr:   at net.mamoe.mirai.internal.contact.SendMessageHandler$sendMessagePacket$1.invokeSuspend(SendMessageHandler.kt)
2021-09-27 08:41:24 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
2021-09-27 08:41:24 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
2021-09-27 08:41:24 W/stderr:   at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
2021-09-27 08:41:24 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib$Companion.KOperation(CPP_lib.kt:329)
2021-09-27 08:41:24 W/stderr:   at tech.eritquearcus.miraicp.shared.CPP_lib.KOperation(CPP_lib.kt)

无法被陌生人邀请加群
陌生人指的是没有添加好友或者添加了好友但在bot这边显示为陌生人的QQ(当bot在qq面板上被设置为添加好友权限为任何人时会出现这种陌生人,目前已设置为需要验证信息以避免产生陌生人
好友邀请加群会成功,但没有触发sendmsg
当接收到戳一戳消息时也会触发这样的错误
该错误不会导致mirai崩溃
程序:

  // 邀请加群
        procession->registerEvent<GroupInviteEvent>([](GroupInviteEvent e) {
			e.accept();
			Friend(MasterQQId, e.bot.id).sendMsg("收到加群邀请,群" + to_string(e.groupid) + e.groupName + ",已同意,邀请者:" + to_string(e.inviterid) + e.inviterNick);
        });

错误信息:

2021-09-27 09:39:33 V/Bot.3457317465: Event: BotInvitedJoinGroupRequestEvent(bot=Bot(3457317465), eventId=1632706774498763, invitorId=2......4, groupId=1......7, groupName=攘......谷), invitorNick=每......所)
2021-09-27 09:39:33 E/MiraiCP: json格式化异常,位置C-Handle
StackTrace:
broadcast(class MiraiCP::GroupMessageEvent)[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:2678]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:304](注:此处是插件在我电脑上的路径,而不是在服务器上的路径
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:575]
2021-09-27 09:39:33 E/MiraiCP: {"source":{"botid":3457317465,"eventid":1632706774498763,"groupid":1......7,"groupname":"攘......谷)","inviterid":2......4,"inviternick":"每......所"},"type":3}
StackTrace:
broadcast(class MiraiCP::GroupMessageEvent)[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:2678]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:304]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:575]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:304]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:575]
2021-09-27 09:39:33 E/MiraiCP: [json.exception.type_error.302] type must be string, but is object
StackTrace:
broadcast(class MiraiCP::GroupMessageEvent)[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:2678]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:304]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:575]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:304]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:575]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:304]
[E:\Mirai\MiraiCP_CPP\cpp\include\miraiCP.hpp:575]

本地运行环境
版本:

名字 出现的版本
loader x
plguin v2.7.1-dev-1

多线程用最初那个方案是可以的,之后更新的

消息回调中消息编码从UTF-8转成了gb2312,看来我之前写的编码部分又要改了,虽然已经猜到之前issue提到的乱码是指的编码问题,都是小事。
多线程最开始改的那个是可以用的,后面更新一次,把全局genv赋值放到getEnv中就没法反向调用kotlin了,啊这。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.