ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
26.81k stars 1.84k forks source link

Intersection and difference bug #3921

Closed MaXDL4Phys closed 3 months ago

MaXDL4Phys commented 3 months ago

Description of bug / unexpected behavior

I tried Intersection and Difference, but they always have different problems. I also tried your base example, which I pasted below to show the problem.

How to reproduce the issue

Code for reproducing the problem ```py from manim import * class IntersectionExample(Scene): def construct(self): sq = Square(color=RED, fill_opacity=1) sq.move_to([-2, 0, 0]) cr = Circle(color=BLUE, fill_opacity=1) cr.move_to([-1.3, 0.7, 0]) un = Intersection(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0, 0]) self.add(sq, cr, un) ❯ manim -pql intersetion.py IntersectionExample Manim Community v0.18.1 ../../../../../../src/cpp/skia-builder/skia/src/base/SkContainers.cpp:106: fatal error: "Requested capacity is too large." [1] 60816 trace trap manim -pql intersetion.py IntersectionExample ```

System specifications

System Details - OS macOS 10.15 (Sonoma 14.6.21)): - RAM: 64 - Python version ('ananconda env - python 3.10.13`): ``` Package Version ---------------------- ----------- appnope 0.1.4 asttokens 2.4.1 Brotli 1.1.0 build 1.2.1 CacheControl 0.14.0 certifi 2024.7.4 cffi 1.17.0 charset-normalizer 3.3.2 cleo 2.1.0 click 8.1.7 click-default-group 1.2.4 cloup 3.0.5 colorama 0.4.6 comm 0.2.2 contourpy 1.2.1 crashtest 0.4.1 cycler 0.12.1 Cython 3.0.11 debugpy 1.6.7 decorator 5.1.1 distlib 0.3.8 dulwich 0.21.7 exceptiongroup 1.2.2 executing 2.0.1 fastjsonschema 2.20.0 filelock 3.15.4 fonttools 4.53.1 future 1.0.0 glcontext 2.5.0 h2 4.1.0 hpack 4.0.0 hyperframe 6.0.1 idna 3.7 importlib_metadata 8.2.0 installer 0.7.0 ipykernel 6.29.5 ipython 8.26.0 isosurfaces 0.1.2 jaraco.classes 3.4.0 jedi 0.19.1 jupyter_client 8.6.2 jupyter_core 5.7.2 keyring 24.3.1 kiwisolver 1.4.5 manim 0.18.1 ManimPango 0.5.0 mapbox_earcut 1.0.1 markdown-it-py 3.0.0 matplotlib 3.9.2 matplotlib-inline 0.1.7 mdurl 0.1.2 moderngl 5.10.0 moderngl-window 2.4.1 more-itertools 10.4.0 msgpack 1.0.8 multipledispatch 0.6.0 nest_asyncio 1.6.0 networkx 3.3 numpy 1.26.4 packaging 24.1 pandas 2.2.2 parso 0.8.4 pexpect 4.9.0 pickleshare 0.7.5 pillow 10.3.0 pip 24.2 pkginfo 1.11.1 platformdirs 4.2.2 poetry 1.8.3 poetry-core 1.9.0 poetry-plugin-export 1.8.0 prompt_toolkit 3.0.47 psutil 5.9.0 ptyprocess 0.7.0 pure_eval 0.2.3 pycairo 1.26.1 pycparser 2.22 pydub 0.25.1 pyglet 1.5.16 Pygments 2.18.0 pyobjc-core 10.3.1 pyobjc-framework-Cocoa 10.3.1 pyparsing 3.1.2 pyproject_hooks 1.1.0 pyrr 0.10.3 PySocks 1.7.1 python-dateutil 2.9.0 pytz 2024.1 PyYAML 6.0.2 pyzmq 25.1.2 rapidfuzz 3.9.6 requests 2.32.3 requests-toolbelt 1.0.0 rich 13.7.1 scipy 1.14.0 screeninfo 0.8.1 setuptools 72.1.0 shellingham 1.5.4 six 1.16.0 skia-pathops 0.8.0.post1 srt 3.5.3 stack-data 0.6.2 svgelements 1.9.6 tomli 2.0.1 tomlkit 0.13.2 tornado 6.4.1 tqdm 4.66.5 traitlets 5.14.3 trove-classifiers 2024.7.2 typing_extensions 4.12.2 tzdata 2024.1 urllib3 2.2.2 virtualenv 20.26.3 watchdog 4.0.1 watermark 2.4.3 wcwidth 0.2.13 wheel 0.43.0 xattr 1.1.0 zipp 3.20.0 zstandard 0.23.0 ```
uwezi commented 3 months ago

could this be a bug in "skia-pathops" for MacOS? https://pypi.org/project/skia-pathops/

Because on my system (Windows 10, Python 3.11.6, skia-pathops 0.7.4) the code above runs fine and produces this output: image

So I have a newer Python, but an older skia-pathops....

uwezi commented 3 months ago

ok, this seems to be a duplicate of https://github.com/ManimCommunity/manim/issues/3456

MaXDL4Phys commented 3 months ago

Thanks @uwezi . Yes, the solution proposed works. Just reinstall skia-pathos via pip

pip install --force-reinstall skia-pathops