Crash report
In case of a firmware crash, OAK cameras will automatically generate a crash report and store it in the device. The crash report contains information about the crash, such as the stack trace, the device's configuration, and the device's state at the time of the crash. The crash report can be read from the device and sent to Luxonis for debugging purposes.Demo
In case a crash report was found on the device, this example will read it and save it to a json file:Command Line
1> python crash_report.py
2 Crash dump found on your device!
3 Saved to crashDump_0_184430102163DB0F00_3575b77f20e796b4e79953bf3d2ba22f0416ee8b.json
4 Please report to developers!
Setup
This example requires the DepthAI v3 API, see installation instructions.Source code
Python
C++
Python
PythonGitHub
1#!/usr/bin/env python3
2
3import cv2
4import depthai as dai
5from json import dump
6from os.path import exists
7
8# Connect to device and start pipeline
9with dai.Device() as device:
10
11 if device.hasCrashDump():
12 crashDump = device.getCrashDump()
13 commitHash = crashDump.depthaiCommitHash
14 deviceId = crashDump.deviceId
15
16 json = crashDump.serializeToJson()
17
18 i = -1
19 while True:
20 i += 1
21 destPath = "crashDump_" + str(i) + "_" + deviceId + "_" + commitHash + ".json"
22 if exists(destPath):
23 continue
24
25 with open(destPath, 'w', encoding='utf-8') as f:
26 dump(json, f, ensure_ascii=False, indent=4)
27
28 print("Crash dump found on your device!")
29 print(f"Saved to {destPath}")
30 print("Please report to developers!")
31 break
32 else:
33 print("There was no crash dump found on your device!")
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.