# Snapshot crashes voxl-camera-server

Source: https://forum.modalai.com/topic/5166/snapshot-crashes-voxl-camera-server
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Tags: camera
Posted: 2026-04-15 13:47:05 UTC by rddrone
Replies: 6 · Views: 3080

## rddrone · 2026-04-15 13:47:05 UTC

* What hardware are you using? MDK-M0204-1-02 (VOXL 2 Mini) + M0161 (IMX412 4K camera)
* What version of software are you using? (SDK 1.6.3 with all packages updated today) `voxl-camera-server             2.2.23`
* How have you configured the software? What is the output of voxl-inspect-services -> not relevant I think, I can provide this on request
* Do you have any logs? See below
* Can you share pictures of your setup? no
* Have you looked at the source code? If so, can you point to any potential issues? see below

`voxl-send-command hires_snapshot snapshot` causes `voxl-camera-server` to crash.
`journalctl -b -u voxl-camera-server --no-pager --follow` shows the server crashes with a segfault:
```
Apr 15 13:38:12 m0104 voxl-camera-server[6083]: ------ voxl-camera-server: Started 1 of 1 cameras
Apr 15 13:38:12 m0104 voxl-camera-server[6083]: ------ voxl-camera-server: Camera server is now running
Apr 15 13:38:24 m0104 voxl-camera-server[6083]: Camera: hires taking snapshot (destination: /data/snapshots/hires-2026-04-15_13:38:24.703.jpg)
Apr 15 13:38:25 m0104 voxl-camera-server[6083]: ERROR:   bufferGetBufferInfo wan't able to successfully find the requested buffer
Apr 15 13:38:25 m0104 voxl-camera-server[6083]: Segmentation fault:   
Apr 15 13:38:25 m0104 voxl-camera-server[6083]: Fault thread: cam0-result(tid: 6161)
Apr 15 13:38:25 m0104 systemd[1]: voxl-camera-server.service: Main process exited, code=killed, status=11/SEGV   
Apr 15 13:38:25 m0104 systemd[1]: voxl-camera-server.service: Failed with result 'signal'.                                                                                                     
Apr 15 13:38:27 m0104 systemd[1]: voxl-camera-server.service: Service hold-off time over, scheduling restart.
Apr 15 13:38:27 m0104 systemd[1]: voxl-camera-server.service: Scheduled restart job, restart counter is at 1.
Apr 15 13:38:27 m0104 systemd[1]: Stopped voxl-camera-server.           
```

Output when running `voxl-camera-server -d 0` (verbose log):
```
...
VERBOSE: Received metadata for frame 45 from camera hires
VERBOSE:        Timestamp: 5666431218886
VERBOSE:        Gain: 104
VERBOSE:        Exposure: 4488219
VERBOSE:        Readout Time: 16328284
VERBOSE: Find 1 buffer in result ring for frame 45
VERBOSE: Received result from HAl3 for frame number 44
VERBOSE: Received 1 buffers from camera hires, partial result:0
VERBOSE: Received output buffer 44 from camera hires
VERBOSE: hires procesing new buffer
VERBOSE: Camera: hires processing small vid frame
VERBOSE: hires procesing new buffer
VERBOSE: Camera: hires processing snapshot frame
ERROR:   bufferGetBufferInfo wan't able to successfully find the requested buffer

Segmentation fault:
Fault thread: cam0-result(tid: 6554)
Segmentation fault
```

https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/4909f89ce65ef5dee3181193487bbde42052a1bb/src/hal3_camera_mgr.cpp#L3124 is likely the call that crashes.
When searching for references for `snap_bufferGroup` I find no use of this variable.
Maybe the snapshot functionality was overlooked when converting to the `mpa_ion_buf_*` API?

## Reply by Alex Kushleyev (ModalAI staff) · 2026-04-15 15:17:04 UTC

@rddrone , can you please provide your `voxl-camera-server.conf` to help us debug / reproduce? 

Alex

## Reply by rddrone · 2026-04-16 07:00:47 UTC (in reply to Alex Kushleyev)

`/etc/modalai/voxl-camera-server.conf`:
```
{
  "version": 0.1,
  "fsync_en": true,
  "fsync_gpio": 109,
  "cameras": [
    {
      "type": "imx412",
      "name": "hires",
      "enabled": true,
      "camera_id": 0,
      "fps": 15,
      "en_rotate": false,
      "en_preview": false,
      "preview_width": 1024,
      "preview_height": 768,
      "en_raw_preview": false,
      "en_small_video": true,
      "small_video_width": 1024,
      "small_video_height": 768,
      "small_venc_mode": "h264",
      "small_venc_br_ctrl": "cqp",
      "small_venc_Qfixed": 30,
      "small_venc_Qmin": 15,
      "small_venc_Qmax": 40,
      "small_venc_nPframes": 9,
      "small_venc_mbps": 2,
      "en_large_video": true,
      "large_video_width": 4056,
      "large_video_height": 3040,
      "large_venc_mode": "h264",
      "large_venc_br_ctrl": "cqp",
      "large_venc_Qfixed": 30,
      "large_venc_Qmin": 15,
      "large_venc_Qmax": 50,
      "large_venc_nPframes": 29,
      "large_venc_mbps": 40,
      "en_snapshot": true,
      "en_snapshot_width": 4056,
      "en_snapshot_height": 3040,
      "exif_focal_length": 3.1,
      "exif_focal_length_in_35mm_format": 17,
      "exif_fnumber": 1.24,
      "snapshot_jpeg_quality": 75,
      "ae_mode": "isp",
      "gain_min": 54,
      "gain_max": 8000
    }
  ]
}
```

## Reply by Alex Kushleyev (ModalAI staff) · 2026-04-16 17:39:39 UTC (in reply to rddrone)

@rddrone , thanks for the information. I will look into this. I have not heard of this issue before, so maybe something new, but i will test it out today.

Alex

## Reply by rddrone · 2026-04-17 06:28:44 UTC (in reply to Alex Kushleyev)

One more thing, not sure if relevant: I use `com.qti.sensormodule.imx412_fpv_flip_20250919_1.bin` from https://forum.modalai.com/post/23837

## Reply by Alex Kushleyev (ModalAI staff) · 2026-04-17 14:31:17 UTC (in reply to rddrone)

@rddrone , you are absolutely right, the snapshot feature was broken. We somehow missed it.

I just fixed it : 
- https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/commit/6e02fdf2fe6a893b1c9e102a346050dece3e1a7d 

and removed references to old buffer groups 
- https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/commit/b84e10c326ad5abd4077c71f28c6d6a4522cc8a0

Please try it out!

Alex

## Reply by rddrone · 2026-04-20 08:58:34 UTC

I tested the fix and snapshots work now, thank you very much!
