# \[BUG\] retrieve\_objects() crashes with CUSTOM\_BOX\_OBJECTS at VGA resolution (ZED SDK 5.0, CUDA error 700)

**URL:** <https://community.stereolabs.com/t/bug-retrieve-objects-crashes-with-custom-box-objects-at-vga-resolution-zed-sdk-5-0-cuda-error-700/8740>\
**Category:** Python\
**Tags:** linux, python, sdk\
**Created:** [May 5, 2025, 9:55pm UTC](https://community.stereolabs.com/t/bug-retrieve-objects-crashes-with-custom-box-objects-at-vga-resolution-zed-sdk-5-0-cuda-error-700/8740 "2025-05-05T21:55:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cubia](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Cubia](https://community.stereolabs.com/u/Cubia)\
**Post date:** [May 5, 2025, 9:55pm UTC](https://community.stereolabs.com/t/bug-retrieve-objects-crashes-with-custom-box-objects-at-vga-resolution-zed-sdk-5-0-cuda-error-700/8740/1 "2025-05-05T21:55:09Z")

</div>

I’m encountering a consistent CUDA crash when calling retrieve\_objects() in ZED SDK 5.0, using `CUSTOM_BOX_OBJECTS` and resolution set to `VGA`.  
The crash occurs even without ingesting any custom detections — just initializing the object detection module with `CUSTOM_BOX_OBJECTS` and retrieving `sl.Objects()` causes a fatal error on the GPU.  
This does not happen with higher resolutions (e.g. `HD720`).

Only occurs with:

- `camera_resolution = sl.RESOLUTION.VGA`
- `object_detection_model = sl.OBJECT_DETECTION_MODEL.CUSTOM_BOX_OBJECTS`
- `depth_mode = sl.DEPTH_MODE.NEURAL` or `NEURAL_LIGHT` (tested with both)
- Works fine at `HD720` and above
- Reproduced consistently with a minimal Python script using the ZED SDK 5.0
- Happens **even without using** `ingest_custom_mask_objects()`
- Crash occurs on `grab()`

Minimal reproducible Python script:

```auto
import pyzed.sl as sl
  
  zed = sl.Camera()
  
  init_params = sl.InitParameters()
  init_params.camera_resolution = sl.RESOLUTION.VGA
  init_params.depth_mode = sl.DEPTH_MODE.NEURAL # also tested with ULTRA
  init_params.coordinate_units = sl.UNIT.METER
  init_params.sdk_verbose = True
  
  assert zed.open(init_params) == sl.ERROR_CODE.SUCCESS
  assert zed.enable_positional_tracking() == sl.ERROR_CODE.SUCCESS
  
  obj_params = sl.ObjectDetectionParameters()
  obj_params.detection_model = sl.OBJECT_DETECTION_MODEL.CUSTOM_BOX_OBJECTS
  assert zed.enable_object_detection(obj_params) == sl.ERROR_CODE.SUCCESS
  
  runtime_params = sl.RuntimeParameters()
  obj_runtime_params = sl.ObjectDetectionRuntimeParameters()
  
  while True:
      if zed.grab(runtime_params) == sl.ERROR_CODE.SUCCESS:
          objects = sl.Objects()
          zed.retrieve_objects(objects, obj_runtime_params) 

```

System Info:

- GPU: NVIDIA RTX 4060 Ti
- Driver: 570.133.20
- OS: Ubuntu 24.04
- ZED SDK: 5.0.0 (Python API)
- Python: 3.9
- CUDA: 12.8

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 7, 2025, 1:02pm UTC](https://community.stereolabs.com/t/bug-retrieve-objects-crashes-with-custom-box-objects-at-vga-resolution-zed-sdk-5-0-cuda-error-700/8740/2 "2025-05-07T13:02:39Z")

</div>

Hi @Cubia  
We were able to replicate the problem.  
The bug will be fixed with oncoming versions of the ZED SDK.
