manim-slides
manim-slides copied to clipboard
[BUG] Segmentation fault when presenting slides
Description
I run the basic example file with the command including manim and
manim-slides BasicExample
but then the interface crashed and the following error appeared:
QOpenGLFunctions created with non-current context
[1] 9459 segmentation fault (core dumped) manim-slides BasicExample
I use python 3.12.3 in a virtual environment on Ubuntu 24.04.
Version
5.1.7
Platform
Ubuntu 24.04 linux
Screenshots
No response
Additional information
No response
Hello! This is the first time I encounter this issue, so I do not know yet the solution.
Are you running the command inside a Docker environment or WSL?
Can you include the output of pip freeze here?
Hello! This is the first time I encounter this issue, so I do not know yet the solution.
Are you running the command inside a Docker environment or WSL?
Can you include the output of
pip freezehere?
There is no output from that command...
Hello! This is the first time I encounter this issue, so I do not know yet the solution. Are you running the command inside a Docker environment or WSL? Can you include the output of
pip freezehere?There is no output from that command...
Very bizarre, can you put a screenshot of you writing that in the terminal and the output here?
I run the Ubuntu by itself, not in WSL.
I run the Ubuntu by itself, not in WSL.
I meant a screenshot of the pip freeze command :)
There's really nothing... ToT
Does not make any sense to me… Is pip working with other subcommands?
I reproduced this with the following virtual environment:
annotated-types==0.7.0
av==12.2.0
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
click-default-group==1.2.4
cloup==3.0.5
decorator==5.1.1
glcontext==2.5.0
idna==3.7
isosurfaces==0.1.2
jinja2==3.1.4
lxml==5.2.2
manim==0.18.1
manim-slides==5.1.7
manimpango==0.5.0
mapbox-earcut==1.0.1
markdown-it-py==3.0.0
markupsafe==2.1.5
mdurl==0.1.2
moderngl==5.10.0
moderngl-window==2.4.6
multipledispatch==1.0.0
networkx==3.3
numpy==1.26.4
packaging==24.1
pillow==10.4.0
pycairo==1.26.1
pydantic==2.8.2
pydantic-core==2.20.1
pydantic-extra-types==2.9.0
pydub==0.25.1
pyglet==2.0.15
pygments==2.18.0
pyrr==0.10.3
pyside6==6.7.2
pyside6-addons==6.7.2
pyside6-essentials==6.7.2
python-pptx==0.6.23
qtpy==2.4.1
requests==2.32.3
rich==13.7.1
rtoml==0.11.0
scipy==1.14.0
screeninfo==0.8.1
shiboken6==6.7.2
skia-pathops==0.8.0.post1
srt==3.5.3
svgelements==1.9.6
tqdm==4.66.4
typing-extensions==4.12.2
urllib3==2.2.2
watchdog==4.0.1
xlsxwriter==3.2.0
[!note] Before the Python venv installation, I ran
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev ffmpegwhich effectively installedbuild-essential 12.10ubuntu1 libcairo2-dev 1.18.0-3build1 libpango1.0-dev 1.52.1+ds-1build1 ffmpeg 6.1.1-3ubuntu5+esm1
This is the output I got when compiling the example:
❯ manim-slides BasicExample
[AVHWDeviceContext @ 0x3a34f00] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[AVHWDeviceContext @ 0x3a37340] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
QOpenGLFunctions created with non-current context
Segmentation fault (core dumped)
I'm running Python 3.12.3 (main, Apr 15 2024, 18:25:56) [Clang 17.0.6 ] on Linux-6.8.0-31-generic-x86_64-with-glibc2.39.
Downgrading to pyside6==6.5.2 fixed the issue. CC @pacaunt
@jeertmans maybe make an extra with pyside6 pinned to 6.5.2?
Hello @bswck, thanks for the update! However, PySide6 is not available on Python 3.12, at least not if installed via Pip, see the Python requires. What version are you using?
Closing as no responses from author, feel free to re-open if you think this is still an issue.
Hey @jeertmans,
I think I am experiencing the same issue that is already identified in this thread.
When I run manim-slides BasicExample, the GUI starts, but is frozen, and then crashes with a segmentation-fault:
$ manim-slides BasicExample
[h264 @ 0x563c0a901fc0] Failed to allocate a vaapi/nv12 frame from a fixed pool of hardware frames.
[h264 @ 0x563c0a901fc0] Consider setting extra_hw_frames to a larger value (currently set to -1, giving a pool size of 36).
[h264 @ 0x563c0a901fc0] get_buffer() failed
[h264 @ 0x563c0a901fc0] thread_get_buffer() failed
[h264 @ 0x563c0a901fc0] decode_slice_header error
[h264 @ 0x563c0a901fc0] no frame!
QOpenGLFunctions created with non-current context
zsh: segmentation fault (core dumped) manim-slides BasicExample
The part about failing to allocate a vaapi/nv12 frame does not always appear (on my CachyOS machine it did not appear at all):
$ manim-slides BasicExample
QOpenGLFunctions created with non-current context
zsh: segmentation fault (core dumped) manim-slides BasicExample
It did not matter, whether I installed using pipx or in a python venv and whether I selected pyside6-full or pyqt6-full.
pip freeze
annotated-types==0.7.0
asttokens==2.4.1
av==13.1.0
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
click-default-group==1.2.4
cloup==3.0.5
decorator==5.1.1
docutils==0.21.2
executing==2.1.0
glcontext==3.0.0
idna==3.10
ipython==8.29.0
isosurfaces==0.1.2
jedi==0.19.1
Jinja2==3.1.4
lxml==5.3.0
manim==0.18.1
manim-slides==5.1.9
ManimPango==0.6.0
mapbox_earcut==1.0.2
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib-inline==0.1.7
mdurl==0.1.2
moderngl==5.12.0
moderngl-window==2.4.6
multipledispatch==1.0.0
networkx==3.4.2
numpy==1.26.4
packaging==24.1
parso==0.8.4
pexpect==4.9.0
pillow==11.0.0
prompt_toolkit==3.0.48
ptyprocess==0.7.0
pure_eval==0.2.3
pycairo==1.27.0
pydantic==2.9.2
pydantic-extra-types==2.9.0
pydantic_core==2.23.4
pydub==0.25.1
pyglet==2.0.18
Pygments==2.18.0
pyrr==0.10.3
PySide6==6.8.0.2
PySide6_Addons==6.8.0.2
PySide6_Essentials==6.8.0.2
python-pptx==1.0.2
QtPy==2.4.1
requests==2.32.3
rich==13.9.3
rtoml==0.11.0
scipy==1.14.1
screeninfo==0.8.1
shiboken6==6.8.0.2
six==1.16.0
skia-pathops==0.8.0.post2
srt==3.5.3
stack-data==0.6.3
svgelements==1.9.6
tqdm==4.66.6
traitlets==5.14.3
typing_extensions==4.12.2
urllib3==2.2.3
watchdog==5.0.3
wcwidth==0.2.13
XlsxWriter==3.2.0
I followed the example from the Quickstart and can reproduce this error on both Manjaro with Python 3.12.6 and CachyOS with Python 3.12.7.
Hi @FloezeTv, thanks for reporting! I will re-open.
Can you test if the issue persists PyQT6 instead of PySide6? And with version 6.7.*?
Yes, the issue occurs with both pyqt6 (installing manim-slides using pyqt6-full) as well as with older versions of pyside6 (I've tested 6.7.3, 6.7.0, 6.6.3.1, and 6.6.0).
Downgrading to
pyside6==6.5.2fixed the issue. CC @pacaunt @jeertmans maybe make an extra with pyside6 pinned to 6.5.2?
@FloezeTv and what about version 6.5.2?
Yes, the issue occurs with both
pyqt6(installingmanim-slidesusingpyqt6-full) as well as with older versions ofpyside6(I've tested6.7.3,6.7.0,6.6.3.1, and6.6.0).
Thanks for testing!
EDIT: I just noticed that you use Python3.12, so version 6.5.2 might not be available...
I downgraded python to 3.11.9 and manim-slides works with pyside6==6.5.2.
pyside6==6.5.3 is broken again, however:
qt.multimedia.ffmpeg.libsymbolsresolver: Couldn't load OpenSsl library
failed to get textures for frame; format: 44 textureConverter null
QOpenGLFunctions created with non-current context
zsh: segmentation fault (core dumped) manim-slides BasicExample
Do you have libva installed? https://github.com/intel/libva
See relevant thread: https://forum.qt.io/topic/150877/qt-multimedia-warnings-qt-6-6-0/8
Yes, libva is installed.
I also found that thread when searching for that error.
I did not get the Couldn't load VAAPI library-message, so I think libva should be working properly.
The line about OpenSSL is because I have OpenSSL 3 installed and QT looks for OpenSSL 1.1 I think (as is also written in that thread).
I downgraded python to
3.11.9andmanim-slidesworks withpyside6==6.5.2.pyside6==6.5.3is broken again, however:qt.multimedia.ffmpeg.libsymbolsresolver: Couldn't load OpenSsl library failed to get textures for frame; format: 44 textureConverter null QOpenGLFunctions created with non-current context zsh: segmentation fault (core dumped) manim-slides BasicExample
If I remember correctly, 6.5.3 introduced some bugs. Does 6.6 and 6.7 versions work on Python 3.11?
I run the Ubuntu by itself, not in WSL.