robotika / katarina

Parrot drone Bebop
MIT License
75 stars 33 forks source link

Cannot make test_cvideo.py work #6

Closed frae83 closed 9 years ago

frae83 commented 9 years ago

Hi, Now that I could compile cvideo, i'm struggling with its usage (Ubuntu 14). Indeed, running test_cvideo.py creates a segmentation fault

bebop@bebop-VBox:~/Python/katarina/samples$ python test_cvideo.py 1
METALOG: logs/meta_150510_175342.log
Flying State 0 landed
ALERT State 0 none/No alert
.Assertion 'pa_atomic_load(&(b)->_ref) > 0' failed at pulsecore/memblock.c:597, function pa_memblock_unref(). Aborting.
Fatal Python error: (pygame parachute) Segmentation Fault
Aborted (core dumped)

Any idea ? (by the way, I cannot make test.py work - Pave does not seems to return any value with my video, but it returns 1 after init())

m3d commented 9 years ago

Hi frae83, can you send me corresponding logfiles so I could try to reproduce the crash in Virtual Box? thanks m. p.s. I was able to view old ARDrone2 video - thanks for compilation fixes :)

frae83 commented 9 years ago

Hi m3d After further investigations, it looks like I am not using the right ffmpeg version. Can you tell me which ffmpeg/opencv version you are using (if under Linux/Ubuntu).

Here are the log files, in case you can do something with that https://www.dropbox.com/s/7jnwaa1oh8pbnpl/cvideo.zip?dl=0

PS : Good to hear that you could view your old video

al3Co commented 9 years ago

Hi frae83, I am running without errors on Mac with 2.4.10.1 version. Regards

m3d commented 9 years ago

Hi frae83, thanks for your log files. I can play the video with play.py navdata_150511_180235.bin as well as see it in test_cvideo.py (both Windows and Ubuntu 14.04). On Ubuntu I tried the latest OpenCV, i.e. 3.0.0-rc1 even I know that some other bits in Katarina code will break. Can you repeat the test? Is is always crashing after about 4 frames? thanks Martin p.s. in order to see the log files in test_cvideo.py I had to add extra sleep into videoCallback(), i.e. import time and then time.sleep(1.0) p.s.2 does it crash if you would repeat the test (maybe with this extra sleep), i.e if you run python test_cvideo.py test logs\meta_150511_180235.log ? p.s.3 (hopefully last ps) - isn't it crash of pygame instead of cvideo? I used "sudo apt-get install python-pygame" to install mine

frae83 commented 9 years ago

Hi all. Finally crash was due to an incompatibility between my OpenCV and FFmpeg. Actually, I build OpenCV with one version of FFmpeg, then upgraded my FFmpeg to last version. In order to fix that, I uninstalled both, then built / installed brand new FFmpeg, and then build Opencv 2.4.10 against this version.

Now it works perfectly . Lesson learned : always be careful when you upgrade key libraries