krontech / pychronos

Python bindings for the Chronos High Speed Camera
GNU General Public License v3.0
3 stars 2 forks source link

Video API crashes switching between preview and live mode. #22

Closed DDR0 closed 5 years ago

DDR0 commented 5 years ago

To reproduce: With both control and video APIs running, run the following script on the camera. Crash should reproduce in under a minute.

#!/bin/bash
IFS=$'\n'
set -euxo pipefail

#Make a recording to play back.
echo | cam-json --control startRecording - > /dev/null
sleep 1
echo | cam-json --control stopRecording - > /dev/null
sleep 1

while true; do
    #Enter live mode.
    echo '{"hres": 599, "yoff": 0, "xoff": 0, "vres": 480}' | cam-json --video configure - > /dev/null
    echo '{}' | cam-json --video livedisplay - > /dev/null
    sleep 1

    #Enter playback mode.
    echo '{"xoff": 0, "yoff": 30, "vres": 361, "hres": 601}' | cam-json --video configure - > /dev/null
    echo '{"framerate": 0}' | cam-json --video playback - > /dev/null
    sleep 1
done
oskirby commented 5 years ago

This looks to be yet another memory leak in the ti81xx firmware, the leak appears to be affecting the first internal heap of the HDVPSS core, which seems to lose about 166kB on each rebuild of the pipeline.

oskirby commented 5 years ago

I think I have tracked down the issue, and it was due to an error in the OMX Gstreamer elements during teardown of the omx_videosink element, which is responsible for outputting frames to the LCD.

Please try updating your gstreamer0.10-openmax-dm81xx packages, this should now be fixed as of version 0.7.0+chronos5.