New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault on container.close() with debugpy #1070
Comments
I've tried to run your example, but I don't even get as far as the incriminated line, because total_frames = video_stream.frames blows up with |
Whoops, small error. I assumed that |
I've not been able to reproduce the crash (I'm on Debian/bookworm): (env) me@mycomputer:~/Development/pyav-org/PyAV$ python -m debugpy --listen localhost:5678 test_av.py
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
168 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I encountered a very similar issue while debugging in Jupyter (or in Jupyter code cells within VSCode). I believe this might be due to Jupyter's internal use of Here's a simple code snippet to reproduce the problem: # %%
import av
with av.open("input.mp4") as input:
stream = input.streams.video[0]
x = 5 # set breakpoint here This issue might be related to #1337 |
Overview
Hi all. I'm experiencing some weird behavior when closing an InputContainer. When debugging with debugpy, I'll get a segmentation fault if I call container.close() or let the object go out of scope with a context manager. I've encountered this issue on different machines, OSes, vms, and it only seems to happen while debugging and after accessing data from a Stream object.
Expected behavior
InputContainer objects should be garbage collected with no segfault
Actual behavior
A SIGSEGV signal is emitted when an InputContainer is closed
Traceback:
Investigation
I've been able to reproduce this behavior on the following platforms
Each segfault happens after closing an InputContainer after accessing any of its Stream objects
Reproduction
The following code should reproduce the error
or
Versions
Research
I have done the following:
Additional context
Strangely enough, I've only encountered this issue while debugging. The code runs fine if no debugger is attached.
The text was updated successfully, but these errors were encountered: