question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Core dumped with FFMPEG format

See original GitHub issue

When getting a reader for a video file like

video_reader = imageio.get_reader(uri='video.avi', format='FFMPEG')

the interpreter hangs indefinitely most of the times (using Python 3.4). With Python 3.5 it gives the following message:

Fatal Python error: could not acquire lock for <_io.BufferedReader name=8> at interpreter shutdown, possibly due to daemon threads

Thread 0x00007fb306522700 (most recent call first):
  File "/home/hugo/.virtualenvs/tracer/lib/python3.5/site-packages/imageio/plugins/ffmpeg.py", line 832 in run
  File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
  File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap

Current thread 0x00007fb317c5c740 (most recent call first):
  File "/home/hugo/.virtualenvs/tracer/lib/python3.5/site-packages/imageio/plugins/ffmpeg.py", line 402 in _terminate
  File "/home/hugo/.virtualenvs/tracer/lib/python3.5/site-packages/imageio/plugins/ffmpeg.py", line 298 in _close
  File "/home/hugo/.virtualenvs/tracer/lib/python3.5/site-packages/imageio/core/format.py", line 245 in close
  File "/home/hugo/.virtualenvs/tracer/lib/python3.5/site-packages/imageio/core/format.py", line 234 in __del__
Aborted (core dumped)

If I video_reader.close() or del video_reader manually, this problem goes away. Is this the expected behavior? Is it documented somewhere and I missed it?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cachitascommented, Dec 7, 2016

Looks like it is fixed. Nice work! 👍

1reaction
cachitascommented, Nov 4, 2016

It hangs at shutdown.

Further testing shows that:

  • only calling r = imageio.get_reader() does not hang
  • calling r = imageio.get_reader() followed by r.get_meta_data() does not hang
  • calling r = imageio.get_reader() followed by r.get_data(some_index) hangs if the script does not reach a call to r.close()
Read more comments on GitHub >

github_iconTop Results From Across the Web

Segmentation fault (core dumped) on large file - FFmpeg Wiki
I am using ffmpeg to compress some big images (about 3500 3000x8000 .tiff files) and I am using this command: ffmpeg -y -framerate...
Read more >
Reasons for "Segmentation fault (core dumped)" when using ...
I want to write a Python C extension that includes a function convertVideo() that converts a video from one format to another making...
Read more >
Why is FFmpeg suddenly throwing “Segmentation fault
The error is from the homebrew formula attempting to apply a patch that is not valid for the newer source code; it's not...
Read more >
"Segmentation fault (core dumped)" when using AMD AMF H ...
Hello, I built ffmpeg with AMD AMF drivers on Ubuntu 22.04 and when I run this command: ffmpeg -i video_sample.mp4 -c:v h264_amf output.mp4....
Read more >
[FFmpeg-user] ffmpeg Malloc check failed(core dump) on armv7
I am running ffmpeg(the latest source code from github) on armv7 qnx. It occasionally core dump with the debug log: #ffmpeg -i imput.mp4...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found