Registry / serialization / pycrashreport

pycrashreport

JSON →
library2.0.0pypypi✓ verified 82d ago

PyCrashReport is a pure Python 3 library designed for parsing and analyzing Apple's crash reports, distilling them into a clearer view by focusing on essential debugging data. It supports user-mode and kernel-mode crash reports, providing basic metadata for other types. The library is actively maintained, with frequent minor updates and a recent major version release (v2.0.0).

pip install pycrashreport
INSTALL
IMPORT
SIG · PYCRASHREPORT
P
pycrashreport
serializationpythonv2.0.0
Install
2.9s avg
Import
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.9s · import 0.000s · 32MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CrashReport
import pycrashreport
from pycrashreport import CrashReport

Instantiate the `CrashReport` object with the content of an Apple crash report (typically an .ips file) and access its parsed attributes like incident identifier, process name, OS version, and the crashed thread's backtrace.

import os from pycrashreport.crash_report import CrashReport # Simulate a crash report content (replace with actual file reading) crash_report_content = """ Incident Identifier: 1234ABCD-ABCD-ABCD-ABCD-1234ABCDABCD CrashReporter Key: 0123456789abcdef0123456789abcdef01234567 Hardware Model: iPhone13,4 Process: MyApp [1234] Path: /private/var/containers/Bundle/Application/APP_UUID/MyApp.app/MyApp Identifier: com.example.MyApp Version: 1.0 (1) Code Type: ARM-64 (Native) Parent Process: launchd [1] Date/Time: 2026-04-16 10:00:00.000 +0000 OS Version: iOS 17.4 (21E236) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [1234] Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x180000000 0x180000000 + 0x21c4 1 MyApp 0x100000000 main + 0 (main.m:16) 2 dyld 0x102000000 start + 0 Binary Images: 0x100000000 - 0x100003fff MyApp arm64e <UUID> /private/var/containers/Bundle/Application/APP_UUID/MyApp.app/MyApp 0x180000000 - 0x18001ffff libsystem_kernel.dylib arm64e <UUID> /usr/lib/system/libsystem_kernel.dylib 0x102000000 - 0x102033fff dyld arm64e <UUID> /usr/lib/dyld """ try: # It's common to pass the raw content or a file-like object # For a real file, you would use: with open('path/to/report.ips', 'r') as f: report = CrashReport(f.read()) report = CrashReport(crash_report_content) print(f"Incident Identifier: {report.incident_identifier}") print(f"Process Name: {report.process_name}") print(f"Process ID: {report.process_id}") print(f"OS Version: {report.os_version}") print(f"Exception Type: {report.exception_type}") print(f"Crashed Thread: {report.crashed_thread_id}") if report.crashed_thread and report.crashed_thread.frames: print("\nCrashed Thread Backtrace:") for frame in report.crashed_thread.frames: print(f" {frame.image_name} {frame.address} {frame.symbol_name if frame.symbol_name else ''}") except Exception as e: print(f"Error parsing crash report: {e}")
Debug
Known issues
breakingThe v2.0.0 release includes 'Update project standards' and a major version bump from 1.x. While specific breaking API changes aren't explicitly detailed in the release notes, users upgrading from 1.x should review the full changelog on GitHub for potential incompatibilities in API or behavior, especially for custom integrations.
fix
Review the official changelog between v1.2.8 and v2.0.0 on GitHub. Update code to align with any new API signatures or changed behaviors.
affects: <2.0.0
gotchaVersions prior to v1.2.7 contained a bug that could lead to 'double-parsing of integer registers', resulting in incorrect register values in the parsed crash reports. This could lead to misdiagnosis of crash causes.
fix
Upgrade to pycrashreport v1.2.7 or later to ensure accurate parsing of integer registers. Re-parse any crash reports processed with affected versions.
affects: <1.2.7
breakingThe command-line script name was changed from a previous name (implicitly 'pycrash' or similar) to `pycrashreport` in version 1.2.1. Users relying on the CLI utility with older script names will experience 'command not found' errors.
fix
Ensure you are using the correct command-line invocation: `pycrashreport <path/to/report.ips>`. Update any scripts or aliases to reflect the new name.
affects: <1.2.1
Upgrade
Version history
2.0.0latest on PyPI · released Mar 30, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
2
Resources
pycrashreport — pip install pycrashreport · libregistry