Skip to content
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

Nothing happens when manimgl is run! #1391

Closed
heethesh opened this issue Feb 16, 2021 · 26 comments
Closed

Nothing happens when manimgl is run! #1391

heethesh opened this issue Feb 16, 2021 · 26 comments

Comments

@heethesh
Copy link

Describe the error

No output on the console or no GUI shows up when manimgl is run from the command line (installed by pip install manimgl). I observe the same issue when running from this repository and installing using pip install -e . as well.

Code and Error

manimgl

Environment

OS System: Ubuntu 20.04.1 (5.8.0.38-generic)
OpenGL version: 4.6.0 NVIDIA 450.102.04
manim version: 1.0.0 (pip install manimgl)
python version: Tried both 3.6 and 3.8

@heethesh heethesh changed the title Nothing happens manimgl is run! Nothing happens when manimgl is run! Feb 16, 2021
@Varniex
Copy link
Contributor

Varniex commented Feb 16, 2021

You need to pass some flag(s) for it to work.
Try manimgl example_scenes.py OpeningManimExample or manimgl example_scenes.py OpeningManimExample -w to write the scene to a file

@gnap114039
Copy link

same issue here !

OS System: Ubuntu 20.04.1 (5.8.0.43-generic)
PyOpenGL: 3.1.5
manim version: 1.0.0 (pip install manimgl)
python version: 3.8.5

I have tried the following command line:

manimgl example_scenes.py OpeningManimExample
manimgl example_scenes.py OpeningManimExample -w
manim-render example_scenes.py OpeningManimExample

the terminal will wait command return after hit enter, and htop showing CPU single thread almost 100 % usage.

@heethesh
Copy link
Author

heethesh commented Feb 16, 2021

You need to pass some flag(s) for it to work.
Try manimgl example_scenes.py OpeningManimExample or manimgl example_scenes.py OpeningManimExample -w to write the scene to a file

Arguments and flags make no difference, the script should show some error or the help menu when nothing is specified. Works as expected with the ManimCommunity fork. See @gnap114039's comment above. I can see similar CPU usage too.

I'm surprised there are no more reports of this issue, I had the same issue on the master branch even before 1.0.0 was merged/released.

@flyotlin
Copy link

Got the same problem, manimgl installed using pip install manimgl.
I've installed ffmpeg and latex before installing manimgl.
No matter arguments or flags are specified or not, nothing pops out in the terminal.

OS: Ubuntu 20.0.1
python: 3.8.5
manim: 1.0.0

@naveen521kk
Copy link
Contributor

naveen521kk commented Feb 18, 2021

Quick answer, try running the command below in same virtual environment.

python -m pip install manimpango --force --no-binary :all:

see if that fixes. Could be related to #1387

@behnamasadi
Copy link

Have the same problem, was wondering if it has somethinig to do with OpenGL verson and GPU driver.

@ghost
Copy link

ghost commented Feb 22, 2021

Same issue
OS: Ubuntu 20.0.1
python: 3.8.5
manim: 1.0.0

@ghost
Copy link

ghost commented Feb 22, 2021

I'm not sure about this
I faced the same problem
but when i install manim using pycharm in venv mode
this issue fixed
something else check the gui driver

@behnamasadi
Copy link

I switched to "Manim Community" repo and it worked like a charm, guess thats the one thatI

@ghost
Copy link

ghost commented Feb 24, 2021

Downgrade moderngl to 5.5.*
pip install moderngl==5.5.*

@naveen521kk
Copy link
Contributor

@MLee-Sci Can you make an issue in moderngl repo if this fixes?

@einarf
Copy link

einarf commented Feb 24, 2021

Do not downgrade moderngl. This can cause more issues.

Downgrading to 5.5.x is not really advicable because it will use statically linked libGL. If it doesn't work with latest moderngl or glcontext it would be nice to figure out why. 😄

@einarf
Copy link

einarf commented Feb 25, 2021

EDIT : This is a manimpango issue

Please follow instructions here : #1391 (comment)
(the manimpango README is also helpful)

@heethesh
Copy link
Author

python -m pip install -I moderngl==5.5.4 definitely solves it for now

This solves the problem, closing this issue.

@einarf
Copy link

einarf commented Feb 25, 2021

The issue itself it not really fixed. It's a band-aid to some other unknown issue. The requirements.txt should ideally be updated to use 5.5.4 until the root cause is identified. It might not even be related to moderngl 5.6.x. Not really sure yet.

@einarf
Copy link

einarf commented Feb 25, 2021

We get stuck here when pyglet calls glXChooseFBConfig . Most likely this is related to some memory issue somewhere. The question is where. It could be anything.

#0  0x00007ffff7fa0729 in __pthread_mutex_unlock_usercnt (mutex=mutex@entry=0x5555565a36e8, decr=decr@entry=0) at pthread_mutex_unlock.c:58
#1  0x00007ffff7fa31dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5555565a36e8, cond=0x5555565a4838) at pthread_cond_wait.c:421
#2  __pthread_cond_wait (cond=0x5555565a4838, mutex=0x5555565a36e8) at pthread_cond_wait.c:638
#3  0x00007fffe931c023 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007fffe931c0d5 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#5  0x00007fffe931c622 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#6  0x00007fffe931c8bb in xcb_send_request_with_fds64 () from /lib/x86_64-linux-gnu/libxcb.so.1
#7  0x00007fffe931cc4d in xcb_send_request () from /lib/x86_64-linux-gnu/libxcb.so.1
#8  0x00007fffe932bfe8 in xcb_query_extension () from /lib/x86_64-linux-gnu/libxcb.so.1
#9  0x00007fffe931eb72 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#10 0x00007fffe931ec2c in xcb_get_extension_data () from /lib/x86_64-linux-gnu/libxcb.so.1
#11 0x00007fffe931c764 in xcb_send_request_with_fds64 () from /lib/x86_64-linux-gnu/libxcb.so.1
#12 0x00007fffe931cc4d in xcb_send_request () from /lib/x86_64-linux-gnu/libxcb.so.1
#13 0x00007fffd2c65b9b in xcb_glx_query_version () from /lib/x86_64-linux-gnu/libxcb-glx.so.0
#14 0x00007fffd2cfda1a in ?? () from /lib/x86_64-linux-gnu/libGLX_mesa.so.0
#15 0x00007fffd2cf9896 in ?? () from /lib/x86_64-linux-gnu/libGLX_mesa.so.0
#16 0x00007fffd2cfb058 in ?? () from /lib/x86_64-linux-gnu/libGLX_mesa.so.0
#17 0x00007fffe4816d6d in glXChooseFBConfig () from /lib/x86_64-linux-gnu/libGLX.so.0
#18 0x00007fffd7e32ff5 in ?? () from /lib/x86_64-linux-gnu/libffi.so.7
#19 0x00007fffd7e3240a in ?? () from /lib/x86_64-linux-gnu/libffi.so.7
#20 0x00007fffd7e4b30e in _call_function_pointer (argcount=4, resmem=0x7fffffff6f70, restype=<optimized out>, atypes=<optimized out>, avalues=0x7fffffff6f40, 

@naveen521kk
Copy link
Contributor

Again, is manimpango the problem? Could you try commenting it out?

@einarf
Copy link

einarf commented Feb 25, 2021

@naveen521kk manimgl runs fine if I comment out all manimpango imports. (with moderngl 5.6.4)

.. so we might have an xy problem here.

@naveen521kk
Copy link
Contributor

@einarf Now try, compiling it from source? python -m pip install manimpango --force --no-binary :all: see if the problem occurs with the imports on?

@einarf
Copy link

einarf commented Feb 25, 2021

@einarf Now try, compiling it from source? python -m pip install manimpango --force --no-binary :all: see if the problem occurs with the imports on?

Yep. This solves the problem. I'm guessing this is relateed to other segfault issues, but here there was memory currption causing a random issue. The random issue was pyglet hanging on glXChooseFBConfig .. something that is a clear indication there is some curruption going on.

@einarf
Copy link

einarf commented Feb 25, 2021

The real solution is to compile manimpango from source. Do not downgrade moderngl 😄

moderngl should be squeeky clean and doesn't really do much on initial import. The action mainly happens on context creation. On import it mainly registers types. I'm guessing a downgrade only changes the memory profile slighty so this random corruption doesn't cause any issues.

@naveen521kk
Copy link
Contributor

I have asked them to do so long back see #1391 (comment)
but nobody cares to read it I think...

I had to have the wheels for Linux simply for readthedocs builds on documentation, which will break if there are no wheels, I have asked users to not install wheels on Linux, but nobody sees to read or it is so hidden...

Meanwhile, let me try if static linking helps here. Again, I would need someone to test or I would simply consider it as fixed :)

@einarf
Copy link

einarf commented Feb 25, 2021

@naveen521kk Poke me any time for testing

I should have followed your advice about compiling it, but I got cought up in the debugger 😄

@naveen521kk
Copy link
Contributor

I plan to remove those wheels in the next release see ManimCommunity/ManimPango#27

@MaciejDzikowski
Copy link

My solution:
sudo apt install gcc

Then, install the newest manimpango:
pip install manimpango==0.2.6

@Acpear
Copy link

Acpear commented Jan 28, 2022

Thanks EVERYBODY!!!!!!!! I ! use ! your ! methods ! and ! SUCCEED!!!!! OHHHHHH!!!!!!!! PERFECT !!!!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants