Skip to content

Scene Caching Tries to Access the Wrong File in Certain Circumstances #451

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

Closed
sudgy opened this issue Sep 18, 2020 · 11 comments · Fixed by #498
Closed

Scene Caching Tries to Access the Wrong File in Certain Circumstances #451

sudgy opened this issue Sep 18, 2020 · 11 comments · Fixed by #498
Assignees
Labels
pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Comments

@sudgy
Copy link

sudgy commented Sep 18, 2020

Consider the following scene:

class Issue3DCache(ThreeDScene):
    def construct(self):
        self.begin_ambient_camera_rotation(rate=0.1)
        self.wait()
        self.wait()

when I run manim once, it makes a black screen as expected, but when I run it again, it crashes saying that it can't find the partial movie file.

When running manim test.py Issue3DCache -pl the first time:

Animation 0 : Partial movie file written in {'.../480p15/partial_movie_files/Issue3DCache/2314591449_1-0_2415171488.mp4'}
Animation 1 : Partial movie file written in {'.../480p15/partial_movie_files/Issue3DCache/1347326907_1-0_2415171488.mp4'}

When running it again:

Wait 0 : Using cached data (hash : 2314591449_1-0_2415171488)
Animation 1 : Partial movie file written in {'.../480p15/partial_movie_files/Issue3DCache/2314591449_1-0_2415171488.mp4'}
Impossible to open 'file:.../480p15/partial_movie_files/Issue3DCache/865043704_1-0_2415171488.mp4'
.../480p15/partial_movie_files/Issue3DCache/partial_movie_file_list.txt: No such file or directory
@huguesdevimeux huguesdevimeux added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Sep 18, 2020
@huguesdevimeux
Copy link
Member

Hi, thanks for the report. Did you try to run this with --disable_caching flag ?

@sudgy
Copy link
Author

sudgy commented Sep 18, 2020

Yeah, I did, and it works fine when using that flag.

@sudgy
Copy link
Author

sudgy commented Sep 18, 2020

Well, I just found somewhere else it breaks without rotation. Let me try to isolate what's breaking it.

@sudgy
Copy link
Author

sudgy commented Sep 18, 2020

Here's a reduced version of another case I found:

class Issue3DCache2(Scene):
    def construct(self):
        self.wait()
        m = Square()
        self.add(m)
        #self.wait()

Run it the first time without the commented wait, and the second time with it. Then a similar problem occurs. However, unlike before, the wait has to be added between runs.

@sudgy sudgy changed the title Scene Caching Breaks With Ambient Camera Rotation Scene Caching Tries to Access the Wrong File in Certain Circumstances Sep 18, 2020
@huguesdevimeux
Copy link
Member

Alright, thanks so much for that.
Last request (I swear !) Could you run a borken scene with -v DEBUG flag (and without --disable_caching flag)and post the logs ?

@sudgy
Copy link
Author

sudgy commented Sep 18, 2020

output.txt

This was the second one (without the rotation), even though the name is still Issue3DCache. It doesn't seem to be that much different.

@sudgy
Copy link
Author

sudgy commented Sep 18, 2020

I was wanting to jump to an earlier commit so I wouldn't have to deal with this problem any more, and I found that the bug was introduced in commit 1a516db.

@huguesdevimeux
Copy link
Member

Maybe this is fixed by #489 . I tested it, and it worked. Could you confirm ?

@sudgy
Copy link
Author

sudgy commented Oct 4, 2020

If it worked for you, I'm fine trusting that. I don't really know any way to test it right now short of uninstalling my copy and then installing from your fork, and that seems like more trouble than it's worth.

@huguesdevimeux huguesdevimeux linked a pull request Oct 4, 2020 that will close this issue
1 task
@sudgy
Copy link
Author

sudgy commented Oct 9, 2020

This has been closed, but it's not actually fixed yet. I'm guessing somebody got confused and thought that #489 was #498.

@huguesdevimeux
Copy link
Member

Sorry for that. nevertheless, now everything is good as #489 is merged :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:bugfix Bug fix for use in PRs solving a specific issue:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants