You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Segmentation fault in release build on MacOS M1 - the slice returned by data_u8() has a null pointer address #9
I have discovered an issue when compiling with --release on a Mac M1
the slice returned by data_u8() has a null pointer.
let camera = Camera::new_default_device();
camera.start();
camera.wait_for_frame();
if let Some(camera_frame)=self.frame.as_ref() {
debug!("Getting frame data");
let data=camera_frame.data();
debug!("frame data u32 ok");
let data_u8=data.data_u8();
debug!("frame data u8 ok len {}",data_u8.len());
debug!("frame data u8 ptr {:?}",data_u8.as_ptr());
[2023-10-05T15:42:31Z DEBUG i2ucam_desktop] step
[2023-10-05T15:42:31Z DEBUG i2ucam_desktop] frame ready
[2023-10-05T15:42:31Z DEBUG i2ucam_desktop] Getting frame data
[2023-10-05T15:42:31Z DEBUG i2ucam_desktop] frame data u32 ok
[2023-10-05T15:42:31Z DEBUG i2ucam_desktop] frame data u8 ok len 3686400
[2023-10-05T15:42:31Z DEBUG i2ucam_desktop] frame data u8 ptr 0x0
zsh: segmentation fault cargo run --release
uname -a
Darwin andy-mac-m1 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 arm64
I just had this problem too. As said above, it only segmentation faults in release mode, which is a problem for me because I'm trying to profile with cargo flamegraph.
Activity
Uriopass commentedon May 20, 2024
Had the same problem. The issue is that
CVPixelBufferLockBaseAddress(ibuf, 1) };needs to be called, but it is only done in debug mode. Opened #11 .mrfoogles commentedon Mar 17, 2025
I just had this problem too. As said above, it only segmentation faults in release mode, which is a problem for me because I'm trying to profile with cargo flamegraph.