원클릭으로
windows-dmp-analysis
// 分析 Windows 崩溃转储文件(.dmp),诊断 MaaEnd 及其依赖项(MaaFramework、MXU)的崩溃。自动从 GitHub Releases 下载对应版本 PDB 符号,使用 minidump-stackwalk 解析堆栈轨迹并定位崩溃根因。当 issue 日志包或附件中发现 .dmp 文件,或用户要求分析 DMP/崩溃转储时使用。
// 分析 Windows 崩溃转储文件(.dmp),诊断 MaaEnd 及其依赖项(MaaFramework、MXU)的崩溃。自动从 GitHub Releases 下载对应版本 PDB 符号,使用 minidump-stackwalk 解析堆栈轨迹并定位崩溃根因。当 issue 日志包或附件中发现 .dmp 文件,或用户要求分析 DMP/崩溃转储时使用。
MaaEnd MapTracker 相关组件编写指南。为 agent/go-service/maptracker 下的 Go 代码提供说明,并提供 MapTracker 的开发文档指引。在参与开发 MapTracker 的 Go 代码实现时,或需要了解 MapTracker 详细工作原理时使用。
向 routes.json 添加环境监测(EnvironmentMonitoring)新观察点条目。使用时:新增 zmdmap / kite_station_i18n 观察点路线配置、适配新版本的环境监测任务、补全缺失的 EnterMap、MapPath 或 MapTarget 数据。会自动检测缺失任务,逐字段询问路线数据后写入 routes.json。
分析 MaaEnd 上游仓库公开 Issue(`https://github.com/MaaEnd/MaaEnd/issues/...` 或 `#1234`)。自动抓取 issue 正文和评论中的 `MaaEnd-logs-*.zip` 附件,下载解压后从 `maafw.log`、`maafw.bak.*.log`、`go-service.log`、`mxu-tauri.log`、`mxu-web-*.log`、`mxu-agent*.log`、`config/*`、`on_error/` 中筛选关键证据,并结合 MaaEnd、MaaFramework、MXU 的代码和文档判断根因、给出修复方案,供用户在让你分析 MaaEnd issue、日志包、识别失败、任务卡死、控制器差异、Pipeline/Agent/MXU 问题时使用。
分析 MaaEnd `CreditShoppingMain` 的日志。用于还原信用购物任务中实际购买了什么商品、每件商品的折扣力度、是否触发过刷新(或刷新次数已用尽)、稳健刷新是否触发、以及信用点的消耗状况。货架槽位必须以日志中的 `CreditIcon`(TemplateMatcher)为锚,有无 `BuyFirstOCR`/`Priority2OCR` 不影响槽位级货架的还原与呈现。适用于用户询问信用点交易、信用购物买了什么、折扣情况、刷新配置、`CreditShoppingMain` 任务行为等场景。
仅分析 `AutoStockStapleMain` 的 MaaEnd 日志。用于还原该任务实际购买了什么、购买所对应的证据、逐步剩余账单(券/账单)数值时间线,以及在 pipeline 或 go-service 中应当加日志/埋点的位置。适用于用户询问 `AutoStockStapleMain`、`AutoStockStaple`、武陵/四号谷地的稳定需求物资购买,或该任务内账单数值变化原因等场景。
MaaEnd Pipeline JSON 编写指南。基于 MaaFramework Pipeline 协议,提供节点命名、识别算法、动作类型、流程控制、可复用节点等编码规范与模式参考。在编写、修改或审查 Pipeline JSON、设计节点流程、使用 TemplateMatch/OCR/Custom 识别或 Click/Swipe 动作时使用。
| name | windows-dmp-analysis |
| description | 分析 Windows 崩溃转储文件(.dmp),诊断 MaaEnd 及其依赖项(MaaFramework、MXU)的崩溃。自动从 GitHub Releases 下载对应版本 PDB 符号,使用 minidump-stackwalk 解析堆栈轨迹并定位崩溃根因。当 issue 日志包或附件中发现 .dmp 文件,或用户要求分析 DMP/崩溃转储时使用。 |
MaaEnd.dmp crashes almost always originate in MaaFramework (C++) or MXU (Rust/Tauri), not MaaEnd's Go code.x86_64 → aarch64 in all download URLs.在本仓库的 issue-ai-analysis workflow 中会安装并确保 minidump-stackwalk 和 dump_syms 可用(见 .github/workflows/issue-ai-analysis.yml)。如果你在本地复现或手动运行本流程,需要自行安装这些工具(可参考下文安装命令)。
Verify before proceeding:
which minidump-stackwalk && which dump_syms
If either is missing, install via:
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y --no-confirm minidump-stackwalk dump_syms
Download .dmp to .cache/dmp-analysis/issue-<number>/.
Sources:
.dmp)MaaEnd-logs-*.zip log packageWORK=".cache/dmp-analysis/issue-<NUMBER>"
mkdir -p "$WORK"
curl -L "<dmp_url>" -o "$WORK/MaaEnd.dmp"
minidump-stackwalk "$WORK/MaaEnd.dmp" 2>/dev/null
This gives without any symbols: OS info, exception type, module list with versions, raw stack frames.
Identify the crashing module from the exception address or the top stack frame.
The DMP filename often contains the crashing PID (e.g. MaaEnd.exe.18188.dmp → PID 18188).
Match this with maafw.log entries tagged [Px18188] to pinpoint the exact crashing session and its timeline.
DMP module version info is frequently empty/unavailable. Prefer log and config sources:
| Priority | Source | How |
|---|---|---|
| 1 | mxu-tauri.log | maa_init success, version: v5.x.x |
| 2 | go-service.log | client_maafw_version / client_version in PI environment log |
| 3 | Config files from logs package | interface.json, maa_option.json |
| 4 | Issue text | User-reported version |
| 5 | Module list in stackwalk output | Version column (often shows ?) |
Record:
5.9.2)1.21.2)MAA_VER="<version>" # e.g. 5.9.2
curl -sL "https://github.com/MaaXYZ/MaaFramework/releases/download/v${MAA_VER}/MAA-win-x86_64-v${MAA_VER}.zip" \
-o "$WORK/maa-fw.zip"
unzip -joq "$WORK/maa-fw.zip" 'symbol/*.pdb' -d "$WORK/pdb/"
PDB files inside symbol/:
| PDB | Corresponding Module |
|---|---|
| MaaFramework.pdb | MaaFramework.dll — core pipeline runtime |
| MaaUtils.pdb | MaaUtils.dll — utility library |
| MaaToolkit.pdb | MaaToolkit.dll — toolkit |
| MaaWin32ControlUnit.pdb | MaaWin32ControlUnit.dll — Win32 controller |
| MaaAdbControlUnit.pdb | MaaAdbControlUnit.dll — ADB controller |
| MaaAgentServer.pdb | MaaAgentServer.dll — agent server |
| MaaAgentClient.pdb | MaaAgentClient.dll — agent client |
| MaaPiCli.pdb | MaaPiCli.exe — CLI entry |
| Others | GamepadControlUnit, CustomControlUnit, NodeServer, Node |
MXU_VER="<version>" # e.g. 1.21.2
curl -sL "https://github.com/MistEO/MXU/releases/download/v${MXU_VER}/MXU-win-x86_64-v${MXU_VER}.zip" \
-o "$WORK/mxu.zip"
unzip -joq "$WORK/mxu.zip" 'mxu.pdb' -d "$WORK/pdb/"
mxu.pdb is at the zip root (≈230 MB).
mkdir -p "$WORK/symbols"
for pdb in "$WORK/pdb/"*.pdb; do
name=$(basename "$pdb" .pdb)
header=$(dump_syms "$pdb" 2>/dev/null | head -1)
debug_id=$(echo "$header" | awk '{print $4}')
dest="$WORK/symbols/${name}.pdb/${debug_id}"
mkdir -p "$dest"
dump_syms "$pdb" > "$dest/${name}.sym" 2>/dev/null
done
minidump-stackwalk "$WORK/MaaEnd.dmp" "$WORK/symbols" 2>/dev/null
Now stack traces include function names, source paths, and line numbers.
EXCEPTION_ACCESS_VIOLATION (0xC0000005) — null/dangling pointer, use-after-freeEXCEPTION_STACK_OVERFLOW (0xC00000FD) — infinite recursion or oversized stack allocationEXCEPTION_ILLEGAL_INSTRUCTION (0xC000001D) — corrupted code or wrong CPU featureSTATUS_STACK_BUFFER_OVERRUN (0xC0000409) — NOT always a real buffer overrun. This is the Windows fast-fail mechanism. Check the first exception parameter:
0x7 = FAST_FAIL_FATAL_APP_EXIT — means std::terminate() / abort() was called, typically from an unhandled C++ exception (e.g. cv::Exception from OpenCV receiving an empty cv::Mat). This is the most common MaaEnd crash pattern.0x2 = FAST_FAIL_RANGE_CHECK_FAILUREEXCEPTION_BREAKPOINT (0x80000003) — deliberate crash / assertion failure / Rust panicMaa*.dll → MaaFramework → upstream MaaXYZ/MaaFrameworkmxu.exe → MXU → upstream MistEO/MXUonnxruntime_maa.dll, opencv_world4_maa.dll, fastdeploy_ppocr_maa.dll → third-party inference/visionDirectML.dll → DirectX ML runtimeViGEmClient.dll → virtual gamepadntdll.dll, KERNELBASE.dll, ucrtbase.dll → OS / CRT; look at the caller frames aboveucrtbase.dll with code 0xC0000409, the real crash site is in the caller frames, not ucrtbase itselfRtlReportCriticalFailure, RtlpLogHeapFailure)rust_begin_unwind, core::panicking::*)If the crash is in MaaFramework:
git clone --depth 1 --branch "v${MAA_VER}" \
https://github.com/MaaXYZ/MaaFramework.git ".cache/upstream-src/MaaFramework"
If the crash is in MXU:
git clone --depth 1 --branch "v${MXU_VER}" \
https://github.com/MistEO/MXU.git ".cache/upstream-src/MXU"
Look up the function and line from the symbolicated stack trace in the cloned source.
## DMP 分析结果
- DMP 文件:`<filename>`
- 操作系统:`<OS version>`
- 异常类型:`<EXCEPTION_*>`
- 崩溃模块:`<module_name>` (版本 `<version>`)
- 崩溃函数:`<symbolicated function name>`
## DMP 崩溃分析
### 崩溃堆栈(crashing thread)
<crashing thread 的全部有效符号化堆栈帧;如堆栈被截断/损坏,请在此说明原因>
### 关键模块版本
| Module | Version |
| ---------------- | ------- |
| mxu.exe | ... |
| MaaFramework.dll | ... |
| ... | ... |
### 根因判断
- 崩溃归属:MaaFramework / MXU / 第三方依赖 / 未知
- 分析:...
- 置信度:高 / 中 / 低
### 建议
- 对用户的建议(升级、绕过方案等)
- 对开发者的建议(上游报告、修复方向)
After analysis is complete:
rm -rf ".cache/dmp-analysis/issue-<NUMBER>"