Segmentation fault when streaming video

Hi!

I am very happy that the video streaming api in olympe was fixed and mostly it works very well. However, sometimes my python script exits with a segmentation fault. I have narrowed it down to that this code can reproduce the issue:

import olympe

drone = olympe.Drone("192.168.42.1")
print("Before connection")
drone.connection()
print("Connected?", drone.connection_state())
drone.start_video_streaming()
print("Entering loop.")
while 1:
    pass

Note however that the error is not consistent, but show up sometimes and sometimes not.

The line print("Connected?", drone.connection_state()) prints:

Connected? ReturnTuple(OK=True, message='The device is connected', value=None, error_code=0)

All the print(…) statements run, including the "Entering loop".

Do you know what the issue can be and how to solve it?

The error mesages:

Fatal Python error: Segmentation fault

Current thread 0x00007fc316e8c700 (most recent call first):
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/_private/pomp_loop_thread.py", line 246 in _wait_and_process
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/_private/pomp_loop_thread.py", line 234 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc31770d700 (most recent call first):
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/_private/pomp_loop_thread.py", line 267 in add_event_to_loop
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/pdraw.py", line 707 in _media_added
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe_deps.py", line 70 in <lambda>
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/_private/pomp_loop_thread.py", line 246 in _wait_and_process
File "/home/username/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/_private/pomp_loop_thread.py", line 234 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc3387d5740 (most recent call first):
File "/home/username/ProjectName/debugSegFault.py", line 11 in <module>

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

My system:
Ubuntu 18.04
Python 3.6.8
Olympe 1.0.1
Pycharm community edition 2019.1.3 (But it also crashes when I run the script from the console)

Any advise would be greatly appreciated. :slight_smile:

2 Likes

Hi,

Thank you for reporting this!

We already have a similar crash report from another user (https://github.com/Parrot-Developers/olympe/issues/7). We are currently working on a fix.

Unfortunately, we are having trouble reproducing the crash on our machines. This is why this bug went unnoticed in the first place.

I’ll keep you informed

Regards

Nicolas

1 Like

Hi again,

Any update on this one? If you still straggle to reconstruct it, please say if there is anything I can help with.

Hello,

Thank you for your assistance! I was very close to ask for your help last week but I think we’ve managed to fix this issue.

We will make a bugfix release shortly and your feedback will be really appreciated then. Thanks in advance!

Nicolas

Excellent!

I am looking forward to the fix.

Note for everyone else who find this thread:

This issue was fixed in Olympe 1.0.1b. :slight_smile:

2 Likes