hmos-cppcrash-analysis

Analyzes HarmonyOS Native crash logs to locate root causes and produce repair recommendations.

2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/IsKenKenYa/skills --skill hmos-cppcrash-analysis-iskenkenya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hmos-cppcrash-analysis
Source: https://github.com/IsKenKenYa/skills/tree/main/skills/harmonyos/solutions/quality/stability/hmos-cppcrash-analysis
Command: npx skills add https://github.com/IsKenKenYa/skills --skill hmos-cppcrash-analysis-iskenkenya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Diagnosing CppCrash (Native layer crash) logs on HarmonyOS/OpenHarmony is slow and error-prone: signals, registers, Native call stacks, symbols, and memory evidence must be correlated before a root cause can be trusted. This Skill turns raw crash logs into an evidence-based root-cause report with responsibility attribution and aligned fix suggestions. ## Core Features & Use Cases - Signal and fault-mode classification: Maps SIGSEGV/SIGABRT/SIGILL/SIGBUS/SIGFPE and si_code to a three-level root-cause chain using a built-in CPP_CRASH fault pattern library. - Module-specific knowledge bases: On-demand references for ArkUI, ArkData, ArkWeb, JS Runtime, JSVM, RenderService, libuv, multithreading, and memory-corruption second-scene analysis. - GWP-ASan report analysis: Parses violation, deallocation, and allocation stacks to identify UAF, double free, and heap overflow with responsibility attribution. - Use Case: Paste a faultlog containing Reason:Signal:SIGSEGV(SEGV_MAPERR) and a Native stack; the Skill extracts key fields via its Python scripts, matches fault patterns, and outputs a structured report distinguishing application-side from system-side root causes. ## Quick Start Analyze this HarmonyOS cppcrash log file and tell me the root cause, responsible module, and how to fix it.

Frequently Asked Questions about hmos-cppcrash-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a HarmonyOS Native crash log?

Provide the cppcrash or faultlog file and the Skill extracts Reason, signal, registers, and the Native call stack using its Python scripts. It then matches the fault against a CPP_CRASH pattern library and outputs a root-cause report with fix suggestions.

How to analyze a GWP-ASan report on HarmonyOS?

When the log contains Reason:GWP-ASAN or the GWP-ASan detection banner, the Skill parses the violation, deallocation, and allocation stacks separately. It identifies Use After Free, Double Free, Buffer Overflow, or Invalid Free and attributes responsibility to the application or system side.

What signals does HarmonyOS cppcrash analysis support?

It supports SIGSEGV, SIGABRT, SIGILL, SIGBUS, SIGFPE, SIGTRAP, and SIGSYS with their si_code subtypes. Each signal maps to a three-level root-cause chain, for example SIGSEGV with SEGV_MAPERR indicates an unmapped address access.

Does this crash analysis require Python dependencies?

The extraction scripts use only the Python standard library and require Python 3.8 or higher. No third-party packages need to be installed, and symbolization with llvm-addr2line is optional when matching BuildID symbols are available.

Why does the report say responsibility is undetermined?

Responsibility stays undetermined when only a memory-corruption second scene is visible or key frames lack symbol resolution. The Skill then requests matching BuildID symbol files or first-scene evidence like GWP-ASan or HWASan reports instead of guessing a fix.

When should I not use Native crash analysis for an app crash?

If the user only reports an app crash without JS or Native evidence, the log type must be identified first. This Skill applies only after the log is confirmed as a Native Crash, not for JS exceptions or app freeze events.