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 when running manimgl #1387
Comments
@eulertour Can you run with the debugger and post the backtrace? gdb -batch -ex "run" -ex "bt" manimgl or better gdb -ex "bt" -ex "run" --args python -c "import manimpango" |
Also, if the problem is with manimpango, can you check whether it works with ManimCE? |
I went back to the version you mentioned, and then created a new conda environment, installed manimgl and ran it without any errors. git checkout ad332c586341a665b2e69d4dbea8b023c66d575d
conda create -n manim_1387 python=3.8
source activate manim_1387
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple/
manimgl And I feel that there is nothing in #1383 that will cause a segfault |
@naveen521kk The first command it works with ManimCE. @TonyCrane If you weren't aware, ManimPango is a custom-written C extension for using Pango. |
does this command show Seg Fault? python -c "import manimpango" |
No |
for the results about using gdb, you don't have debugging symbols installed see https://wiki.python.org/moin/DebuggingWithGdb without the stack trace, it should be difficult for me to help... possibly try with system python in |
You don't have to help, I almost never use I'm suggesting to make the change optional because the functionality isn't necessary to use manim and the code is unstable. |
rather try running python using the verbose mode, python -v -m manimlib |
Try removing |
I made a pastebin here: https://pastebin.com/dzV8dJpW. |
The paste says, https://pastebin.com/dzV8dJpW, the import so after the I think this should be the cause of Seg Faults 368a6c3 |
@eulertour try setting env var |
Running on both 96d9a66 and 368a6c3 runs normally. Dumping the traceback gives https://pastebin.com/HqsELR16. I don't know if the problem is caused by ManimPango either. From what I've looked at it seems to be some interaction between ManimPango and moderngl that causes the problem. But being able to use manim is more important than being able to use pango, so to prevent breaking the entire library it makes more sense just to make it optional. |
Just a last try, remove this line in Line 26 in b7e2abb
|
It still segfaults when that line is commented, and I verified that the import wasn't occurring anywhere else. |
Try compiling manimpango yourselves, maybe that fixes it? python -m pip install manimpango --no-binary :all: --force |
Compiling locally fixes the problem on ad332c5 and master. |
Ah, I understand what happens, there are two different Pango version one used by manimpango and the other one from your system. Since, it's linux and gnome, any window which is opened uses pango for text rendering and this conflicting version, causing a segmentation fault. That's a reason I always recommend Linux users to install without using wheels, https://github.com/manimcommunity/manimpango#note, and I created those wheels only for the case of RTD build on Community Edition. It's also a notable reason why there don't exist wheels for pycairo outside of Windows. For other OS like Mac and windows, this doesn't happen because the system uses its own rendering system and not Pango. |
Describe the bug
Running
manimgl
with or without arguments results in a segfaultCode:
n/a
Wrong display or Error traceback:
Additional context
The crash began after #1383 was merged.
The text was updated successfully, but these errors were encountered: