Page 1 of 1

CM3 Two Camera Previews, one "hangs/freezes"

Posted: Thu Mar 21, 2019 6:28 pm
by Naro
Hello,

First time forum poster here, but I hit a wall in debugging this issue. Thank you in advance for any input!

Issue:
I am using two instances of raspistill preview for two hours on two Pi Cameras V2 which are attached to Cam 0/1 ports on the CM3. One of the two previews displayed, for varying amounts of time, simply stops working and "hangs/freezes." Both raspistill processes stay up for the allotted time, despite one of them being stuck on one frame. The earliest the the bug has appeared has been within 10 minutes. Sometimes it has even ran for 2 hours without hitting the issue. A lot of times it appears in the one hour mark.

Setup:

During debugging this I decided to start from scratch and see if I still ran into the issue. I definitely still ran into the issue, and here are the steps I took in setting up this CM3:
Brand new CM3
Raspbian Stretch with desktop on a 64 bit SD card
Followed these instructions to set up the cameras. I used the bts file on the bottom of this tutorial linked under "Enable Both Cameras" and followed the instructions to compile it to bt-boot.bin
https://www.raspberrypi.org/documentati ... -camera.md
That's it! then I ran 2 instances of raspistill for two hours and the issue was still there.

What I need:
I need to display live feed from both cameras with them not spontaneously freezing. I discovered the problem writing python code using picamera. I simplified my python code to simply make two picameras, one for each port, and used start_preview for both of them, and this issue consistently appeared within 10 minutes. I was curious if I was going crazy or this issue still happened with raspistill previews, and it does.

What I've tried:

I've read through many forum posts on this sight that is in any way related to camera feed freezing.
Not super savvy on going through logs trying to see if there's any issues popping up, but I do know:
1. The pi is not overheating
2. The pi is receiving enough Voltage
3. This is driving me crazy

I hope there is a simple fix to this, or maybe I am doing something blatantly wrong. Thanks again.

Re: CM3 Two Camera Previews, one "hangs/freezes"

Posted: Thu Apr 04, 2019 3:55 pm
by Naro
Updates:

Setting specific camera modes to lower resolutions and setting the frame rate to be lower has a direct effect on this bug.

The freeze didn't come up over night in python's picamera preview at all if I set one camera's frame rate to 10 and the other's to 20. It also doesn't happen over night on raspistill if I force the camera mode to 4.

Its as if specs that the CM3 can handle when running 1 camera are significantly different the specs it can support when running 2? There's a line somewhere and I am not sure where it is. I am only making speculations off of many tests.

Edit 4/9/19:

If your running into this issue and need an answer... all we are doing is reducing quality until the bug goes away. Dropping frame rate and image size are the two best things to play with for the freezing/hanging to go away. Its unfortunate that the specs we want work just fine with one camera, but doesn't seem to work when two cameras are running simultaneously.

I am not convinced that reducing frame rate/size is an actual fix but rather a way to push away the problem to a time that doesn't effect your project. I read a lengthy post of a project that runs into a similar problem for a camera that needs to run year round. The difference was that his problem appeared after a week while mine appeared after a hour. My theory - backed up by no solid evidence whats so ever - is that there is a seg fault somewhere. I kept running into that error message several times when running my python code.

Re: CM3 Two Camera Previews, one "hangs/freezes"

Posted: Thu Apr 04, 2019 6:02 pm
by douglas5962
It doesn't sound like a bug but rather that you are overloading the CM3. I would also check the signal integrity coming from the cameras as you may be feeding noisy data into the CM3 and eventually crashing it.