RaspberryPi_WebRTC
RaspberryPi_WebRTC copied to clipboard
Segmentation fault only occurs when I run my own build [RPI Zero 2w] [libcamera]
Device: RaspberryPi Zero 2W OS: Raspios debian 12 (bookworm) 64bit
======================================================================= Running script:
#!/bin/bash #start-webrtc.sh
APP="./pi-webrtc"
$APP
--camera=libcamera:0
--fps=30
--width=640
--height=480
--use-mqtt
--mqtt-host=xxxxxx
--mqtt-port=8883
--mqtt-username=xxxxxxx
--mqtt-password=xxxxxxxx
--uid=xxxxxxxxxx
--no-audio
--hw-accel
--enable-ipc
--no-adaptive
--ipc-channel=lossy
=================================================================
Hi. First of all, thank you for your excellent project. I’m trying to use your project as part of my robot project. When I downloaded and ran the prebuilt RPiOS version you released, it worked very well without any major issues. Here’s the log from that run:
Using libcamera, ID: 0 [conductor] Use libcamera capturer. [1:52:54.231264497] [1834] INFO Camera camera_manager.cpp:330 libcamera v0.5.2+99-bfd68f78 [1:52:54.314578244] [1842] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /usr/share/libcamera/ipa/rpi/vc4/imx219.json [1:52:54.334394243] [1842] INFO Camera camera_manager.cpp:220 Adding camera '/base/soc/i2c0mux/i2c@1/imx219@10' for pipeline handler rpi/vc4 [1:52:54.334612160] [1842] INFO RPI vc4.cpp:440 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media3 and ISP device /dev/media0 [libcamera_capturer] camera id: /base/soc/i2c0mux/i2c@1/imx219@10 [libcamera_capturer] camera validated format: 640x480-YUV420/SMPTE170M. [libcamera_capturer] width: 640, height: 480, stride: 640 [1:52:54.336687010] [1834] INFO Camera camera.cpp:1215 configuring streams: (0) 640x480-YUV420/SMPTE170M [1:52:54.337476440] [1842] INFO RPI vc4.cpp:615 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 640x480-SBGGR10_1X10/RAW - Selected unicam format: 640x480-pBAA/RAW [rtc_peer] => Set sdp success! [rtc_peer] => Set sdp success!
However, when I downloaded the source code and built it myself, a segmentation fault occurred even though I used the same command. Here’s the log from that case:
Using libcamera, ID: 0 [conductor] Use libcamera capturer. [1:56:17.811424559] [1883] INFO Camera camera_manager.cpp:330 libcamera v0.5.2+99-bfd68f78 [1:56:17.892839981] [1891] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /usr/share/libcamera/ipa/rpi/vc4/imx219.json [1:56:17.910903205] [1891] INFO Camera camera_manager.cpp:220 Adding camera '/base/soc/i2c0mux/i2c@1/imx219@10' for pipeline handler rpi/vc4 [1:56:17.911121070] [1891] INFO RPI vc4.cpp:440 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media3 and ISP device /dev/media0 [libcamera_capturer] camera id: /base/soc/i2c0mux/i2c@1/imx219@10 [libcamera_capturer] camera validated format: 640x480-YUV420/SMPTE170M. [libcamera_capturer] width: 640, height: 480, stride: 640 [1:56:17.913013002] [1883] INFO Camera camera.cpp:1215 configuring streams: (0) 640x480-YUV420/SMPTE170M [1:56:17.913816546] [1891] INFO RPI vc4.cpp:615 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 640x480-SBGGR10_1X10/RAW - Selected unicam format: 640x480-pBAA/RAW ./start_webrtc.sh: line 21: 1883 Segmentation fault $APP --camera=libcamera:0 --fps=30 --width=640 --height=480 --use-mqtt --mqtt-host=xxxxxxxx --mqtt-port=8883 --mqtt-username=xxxxxxx --mqtt-password=xxxxxxx --uid=xxxxxxxxx --no-audio --hw-accel --enable-ipc --no-adaptive --ipc-channel=lossy
Could I ask for some help regarding this issue?
Ahh. For now, I’ve successfully run the self-built code by building the source code directly on a real Raspberry Pi Zero 2W, instead of using the cross-build environment described in [https://github.com/TzuHuanTai/RaspberryPi-WebRTC/blob/main/doc/SETUP_ARM64_ENV.md ]. I’m not sure what the problem was, but anyway, it seems like the urgent issue is resolved for now.