manim-slides icon indicating copy to clipboard operation
manim-slides copied to clipboard

[BUG] Concurrency bug when reversing videos

Open ghost opened this issue 1 month ago • 3 comments

Terms

Describe the issue

When rendering the videos, once every 10 or 20 times the render process gets stuck in a semaphore. After manually interrupting the process, a stack trace is shown that indicates it may be stuck in a deadlock.

I am not able to create a minimal example, due to lack of time, but I did not have any issues with smaller projects. A snapshot of the full repository where I have experienced this bug is here: https://codeberg.org/praalhans/animations/commit/55989b83005aeffb5b83690f134eac8b4758755c

Command

manim render presentation.py

Issue Type

Installation issue

Python version

Python 3.13.7

Python environment

Manim Slides version: 5.5.2
Python executable: /nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/bin/python3.13
Manim bindings:
	manim (version: 0.19.0)
	manimgl not found
Qt API: pyqt6 (version: 6.9.2)

What is your platform?

Linux

Relevant log output

Traceback (most recent call last):
  File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/multiprocessing/process.py", line 313, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/multiprocessing/pool.py", line 114, in worker
    task = get()
  File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/multiprocessing/queues.py", line 384, in get
    with self._rlock:
         ^^^^^^^^^^^
  File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/multiprocessing/synchronize.py", line 95, in __enter__
    return self._semlock.__enter__()
           ~~~~~~~~~~~~~~~~~~~~~~~^^
KeyboardInterrupt
Traceback (most recent call last):

ghost avatar Oct 02 '25 08:10 ghost

Hi @praalhans, thanks for reporting! Could it be a duplicate of #562?

jeertmans avatar Oct 02 '25 10:10 jeertmans

Not sure, my memory fails me here but I might have seen it also hang somewhere else. Have added the workaround of #562 and will report back when the problem persists or not.

ghost avatar Oct 02 '25 10:10 ghost

Thanks! Let me know if that's the same bug or not, so I can mark this as duplicate :-)

jeertmans avatar Oct 02 '25 15:10 jeertmans