Skip to content

Latest commit

 

History

History
89 lines (70 loc) · 4.05 KB

CrashAnalysis.md

File metadata and controls

89 lines (70 loc) · 4.05 KB

Get-Process vs_BuildTools,vs_setup_bootstrapper,setup | Select ProcessName,Id,CPU,StartTime Get-Content "$env:TEMP\dd_setup_*" -Tail 40 -Wait# CrealityScan ↔ OrbbecSDK Crash Analysis

This doc helps resolve APPCRASH in OrbbecSDK.dll (AV c0000005).

What to collect

  • Crash dump: copy WER minidump from the Event Viewer path into a local folder.
  • Symbols: matching OrbbecSDK.pdb from the build used by the shipped DLL.
  • Build commit: SHA and build config (Release/Debug) of OrbbecSDK_v2.
  • Repro: device model/firmware, steps to crash, OS and GPU driver versions.

Enable LocalDumps for a clean repro

Create registry keys so a full dump is captured on the next crash:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\CrealityScan 4.exe]
"DumpFolder"=hex(2):44,00,3a,00,5c,00,43,00,72,00,65,00,61,00,6c,00,69,00,74,00,79,00,5c,00,43,00,72,00,61,00,73,00,68,00,44,00,75,00,6d,00,70,00,73,00,00,00
"DumpType"=dword:00000002
"DumpCount"=dword:00000010

Or use PowerShell:

$exe = "CrealityScan 4.exe"
$base = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\$exe"
New-Item -Path $base -Force | Out-Null
New-ItemProperty -Path $base -Name DumpType -Value 2 -PropertyType DWord -Force | Out-Null
New-ItemProperty -Path $base -Name DumpCount -Value 10 -PropertyType DWord -Force | Out-Null
New-ItemProperty -Path $base -Name DumpFolder -Value "D:\Creality\CrashDumps" -PropertyType ExpandString -Force | Out-Null

Build Artifacts & Symbol Sources (Updated 2025-12-27)

Rebuilt OrbbecSDK v2.5.5 (with debug symbols):

  • DLL: D:\Projects\OrbbecSDK_v2\build_win_x64\win_x64\bin\OrbbecSDK.dll
  • PDB: D:\Projects\OrbbecSDK_v2\build_win_x64\bin\RelWithDebInfo\OrbbecSDK.pdb
  • Configuration: RelWithDebInfo (x64, MSVC v143)
  • Build Date: 2025-12-27
  • Disabled PALs: USB, NET, GMSL (to avoid ATL dependency)

Available Dump:

  • File: D:\Creality\CrashDumps\CrealityScan 4.exe_251225_233457.dmp
  • Size: ~1.1 GB (full memory dump)
  • Capture Date: 2025-12-25 23:34:57

WinDbg workflow

  1. Install WinDbg (X64) or use Visual Studio debugger.
  2. Set symbol path:
    • .symfix
    • .sympath+ D:\Projects\OrbbecSDK_v2\build_win_x64\bin\RelWithDebInfo
    • .reload /f OrbbecSDK.dll
  3. Open dump: File → Open Crash Dump → select the .dmp file above.
  4. Run analysis: !analyze -v to get summary of exception.
  5. Identify module: lm m OrbbecSDK (note base address, timestamp, PDB info).
  6. Resolve offset: ln OrbbecSDK+0x115c20 → resolves to function/line if PDB GUID matches.
  7. Inspect stack: kp (pretty-print stack), dds rsp (stack dump), .frame <n> to switch frames.

Note: PDB Matching

  • The rebuilt PDB may not match the shipped DLL if they were built with different flags/commits.
  • If GUID mismatch occurs, WinDbg will warn but ln may still resolve to the nearest export.
  • For 100% accurate source mapping, obtain the PDB from the Creality/Orbbec official build or rebuild with exact options.

Collecting dumps from WER

  • Use the helper script to copy the latest archive:
pwsh -File .\scripts\win\collect_dump.ps1 -OutDir "D:\Creality\CrashDumps"
  • If only report.wer exists (no .dmp), enable LocalDumps (above) and repro the crash to generate a full dump.

Visual Studio alternative

  • VS → File → Open → File → select .dmp → set symbol path in Tools → Options → Debugging → Symbols.
  • Load native symbols for OrbbecSDK.dll and step through if available.

Dependency sanity checks

Use Dependencies (lucasg) or dumpbin /dependents to confirm CRT, libusb, live555, etc. are present and compatible.

Quick mitigations

  • Update VC++ 2015–2022 x64 redist.
  • Update Orbbec device drivers/firmware to match the SDK.
  • Try a known-good OrbbecSDK.dll built from your repo (backup original).
  • Temporarily disable the plugin to confirm exclusivity of the fault.

Symbol path helper

See scripts/windbg/set_symbols.ps1 for setting _NT_SYMBOL_PATH to local PDBs + MS public symbols.