Nambers / MiraiCP

c++ SDK of Mirai
https://eritque-arcus.tech/MiraiCP/
GNU Affero General Public License v3.0
177 stars 31 forks source link

LibLoader 严重报错 #170

Closed ofbwyx closed 1 year ago

ofbwyx commented 1 year ago

Code of Conduct

问题描述

插件加载后行为正常,但在使用 #ReloadPlugin#PluginList#DisablePlugin 等指令时会出现错误:

微信截图_20230123165331

中止导致 Process exited with 3

重试导致image随后 MiraiCP 无响应。

忽略导致 Process exited with -1073740791

插件代码:

#include <MiraiCP.hpp>
using namespace MiraiCP;
const PluginConfig CPPPlugin::config{
        "test",
        "test",
        "0.0",
        "ofbwyx",
        "Bot System",
        "2023.1"
};
class PluginMain : public CPPPlugin {
public:
    PluginMain() : CPPPlugin() {}
    ~PluginMain() override = default;
    void onEnable() override {
        Logger::logger.warning("Enable");
        Event::registerEvent<GroupMessageEvent>([](GroupMessageEvent e) {
            Logger::logger.warning("Message");
        });
    }
    void onDisable() override {
        Logger::logger.warning("Disable");
    }
};
void MiraiCP::enrollPlugin() {
    MiraiCP::enrollPlugin<PluginMain>();
}

MCL:2.1.2;Java 17(64 位);Mirai:2.14.0-RC;MiraiCP:2.13.1;目录中均无中文。

日志

2023-01-23 16:57:49 I/MiraiCP: ⭐MiraiCP启动中⭐
2023-01-23 16:57:49 I/MiraiCP: ⭐github地址:https://github.com/Nambers/MiraiCP
2023-01-23 16:57:49 I/MiraiCP: ⭐MiraiCP-loader 版本: 2.13.1, 构建时间: Sat Jan 21 19:45:55 UTC 2023
2023-01-23 16:57:49 I/MiraiCP/LibLoader: ⭐libLoader 版本: v2.13.1
2023-01-23 16:57:49 I/MiraiCP/LibLoader: loaded plugin E:\Mirai\plugin\Test\build\Release\Test.dll in 14ms
2023-01-23 16:57:49 I/MiraiCP: ⭐已成功启动MiraiCP⭐
2023-01-23 16:57:49 I/MiraiCP/LibLoader: libLoader thread start

版本

2.13.1

组件

LibLoader

编译器

Microsoft Visual C++ (MSVC)

系统

Windows

架构

x86-64/amd64

Antares0982 commented 1 year ago

现在还有死锁的问题,等会push