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

Fix APNG info after seeking backwards more than twice #7701

Merged
merged 6 commits into from
Jan 11, 2024

Conversation

esoma
Copy link
Contributor

@esoma esoma commented Jan 7, 2024

Fixes #7700

@hugovk
Copy link
Member

hugovk commented Jan 7, 2024

Please could you add a test for this?

@radarhere radarhere changed the title (7700) Fix info for first frame of apng images getting clobbered when seeking to the first frame multiple times. Fix info for first frame of apng images getting clobbered when seeking to the first frame multiple times Jan 7, 2024
@esoma
Copy link
Contributor Author

esoma commented Jan 8, 2024

@hugovk
Added the test and checked it against main to ensure it produces the issue. If ya'll have any preferences on the naming of the test or if you want a full explanation of the issue in the test just let me know.

I'm guessing the codecov failure is because the github actions aren't approved to run and the appveyor builds don't emit coverage in the src directory.

@radarhere
Copy link
Member

I approved the GitHub Actions run and CodeCov is no longer failing.

Comment on lines 694 to 696
def test_apng_issue_7700():
# https://github.com/python-pillow/Pillow/issues/7700
with Image.open("Tests/images/apng/issue_7700.png") as im:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you give the test and image more descriptive names than issue_7700?

Tests/test_file_apng.py Outdated Show resolved Hide resolved
Tests/test_file_apng.py Outdated Show resolved Hide resolved
@esoma
Copy link
Contributor Author

esoma commented Jan 8, 2024

Is an occasional segfault in testing a known issue? I'm guessing the reason for the failing action is not related to this PR.

@nulano
Copy link
Contributor

nulano commented Jan 9, 2024

Someone has triggered it to re-run so I can't see which job failed, but yes, the PyPy jobs occasionally segfault while collecting tests.

@radarhere
Copy link
Member

I triggered the rerun. It was https://github.com/python-pillow/Pillow/actions/runs/7452748291/job/20281343444 that failed.

@esoma esoma requested a review from hugovk January 9, 2024 01:36
Tests/test_file_apng.py Outdated Show resolved Hide resolved
@radarhere radarhere changed the title Fix info for first frame of apng images getting clobbered when seeking to the first frame multiple times Fix PNG info after seeking backwards more than twice Jan 9, 2024
@radarhere radarhere changed the title Fix PNG info after seeking backwards more than twice Fix APNG info after seeking backwards more than twice Jan 9, 2024
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Tests/test_file_apng.py Outdated Show resolved Hide resolved
@radarhere radarhere added the Bug Any unexpected behavior, until confirmed feature. label Jan 10, 2024
@hugovk
Copy link
Member

hugovk commented Jan 11, 2024

Thank you!

@hugovk hugovk merged commit fc67ee2 into python-pillow:main Jan 11, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Any unexpected behavior, until confirmed feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seeking APNG to frame 0 multiple times breaks the info attribute
4 participants