- docs/update: add v5.0.1 release notes (bilingual) for the libloader crash fix, the typed event bus and the new CI - docs/update: add the 5.0.1 entry to the changelog
4.8 KiB
JuiceAgent 5.0.1 Release Notes
中文
🐛 修复
-
修复配置错误导致目标 JVM 崩溃:当
config.toml缺少必填项(例如JarLoader.Mode)或语法不合法时,被注入的目标 JVM 会以EXCEPTION_ILLEGAL_INSTRUCTION崩溃。根因是
libloader.dll采用反射加载(手动映射),其展开表(unwind tables)不会被系统登记,因此在其中抛出的 C++ 异常既无法 unwind 也无法被 catch——try/catch在这里是无效的。修复方式:- 配置读取全部改为非抛出:缺 key / 类型不符只记日志并提前返回,报错精确到具体 key;
- 配置解析在无异常模式下进行(
toml::parse_result),畸形 TOML 也只报错、不崩; libloader目标以-fno-exceptions编译,以后任何会抛异常的代码都会在编译期失败。
✨ 新功能
- 事件总线新增
subscribeFront/listenFront:可将监听者插入队首优先执行(为后续 transformer 管线预留的顺序能力)。
🔧 内部改动
- 用约 60 行的类型安全事件总线替换第三方库
eventpp:监听者按事件类型注册与调用,不再有const void*强转;同时移除 in-tree 的 eventpp 头文件(23 个文件,约 144 KB)及其 license。 - 移除无引用的
MethodEntry/MethodExit事件定义。
📝 文档
- 新增 docs/config.md(v2 配置完整参考)与 docs/update/(发布说明 + CHANGELOG)。
- 重写 docs/advanced.md;README(中/英)配置示例升级到 v2。
🔁 CI
- 新增 GitHub Actions 工作流
.github/workflows/ci.yml:在windows-latest上用 MinGW-w64 + Ninja 构建、运行集成测试、打包,并把JuiceAgent_v*.zip作为 artifact 上传(保留 14 天)。 - 新增可复用的测试脚本
tests/run-tests.ps1:编译 → 刷新tests/resources→ 逐条运行并按输出断言(测试程序即使失败也返回 0,所以只看退出码不够)。 - 构建改为静态链接 C/C++ 运行时(与本地 w64devkit 一致),避免运行时 DLL 版本不匹配导致
UnsatisfiedLinkError。
English
🐛 Fixes
-
Fix a config error crashing the target JVM: when
config.tomlwas missing a required key (e.g.JarLoader.Mode) or was malformed, the injected target JVM crashed withEXCEPTION_ILLEGAL_INSTRUCTION.The root cause is that
libloader.dllis reflectively loaded (manually mapped), so its unwind tables are never registered with the OS and a C++ exception thrown inside it can be neither unwound nor caught -try/catchsimply cannot work there. The fix:- configuration reads are now non-throwing: a missing key or type mismatch is logged and the loader returns early, with the error naming the exact key;
- config parsing happens in non-throwing mode (
toml::parse_result), so malformed TOML is reported instead of crashing; - the
libloadertarget is compiled with-fno-exceptions, so any exception-capable code added later fails the build instead of crashing at runtime.
✨ Features
- New
subscribeFront/listenFronton the event bus, to register a listener ahead of the existing ones (ordering support for a future transformer pipeline).
🔧 Internal
- Replace the
eventppdependency with a ~60-line, type-safe event bus: listeners are registered and invoked by concrete event type, with noconst void*casting; the in-tree eventpp headers (23 files, ~144 KB) and their license are removed. - Remove the unreferenced
MethodEntry/MethodExitevent definitions.
📝 Docs
- Add docs/config.md (full v2 configuration reference) and docs/update/ (release notes + changelog).
- Rewrite docs/advanced.md; update the config examples in both READMEs to v2.
🔁 CI
- Add a GitHub Actions workflow (
.github/workflows/ci.yml) that builds with MinGW-w64 + Ninja onwindows-latest, runs the integration tests, packages the release, and uploadsJuiceAgent_v*.zipas a build artifact (14-day retention). - Add a reusable test runner,
tests/run-tests.ps1, which compiles the modules, refreshestests/resources, then runs every test and asserts on its output (the test programs exit 0 even on failure, so exit codes are not enough). - Link the C/C++ runtime statically (matching the local w64devkit build) so the DLLs do not fail to load because of a mismatched runtime DLL on the machine.
如果您在使用过程中遇到问题,可以加入我们的QQ/Discord群组 If you encounter any issues during use, you can join our QQ/Discord group
Discord: JuiceDev QQ群: 1103504356
Full Changelog: https://github.com/xiaozhou233/JuiceAgent/compare/v5.0.0...v5.0.1