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

[REGRESSION] Loading XCF files is broken on 32-bit as of 2.0.5 #160

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

[REGRESSION] Loading XCF files is broken on 32-bit as of 2.0.5 #160

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.5
Reported for operating system, platform: Windows 7, x86

Comments on the original bug report:

On 2020-01-11 02:44:38 +0000, Austin Hurst wrote:

I'm one of the maintainers of the pysdl2 project, and have spent a good chunk of the past week updating the test/CI suite to support the current set of SDL2 libraries. In the process, I think I've found a regression in SDL2_image from 2.0.4 to 2.0.5: loading XCF images (well, our test XCF image) no longer works with the official 32-bit Windows runtime DLLs (returns a null pointer instead of a surface).

Here's the Appveyor output for a commit before I disabled XCF tests on 32bit: https://ci.appveyor.com/project/a-hurst/py-sdl2/builds/29985808

You can see that the tests for IMG_LoadXCF_RW (and other image-loading functions with the .xcf test image) fail with the 32-bit SDL2_image 2.0.5, but pass with the 64-bit SDL2_image 2.0.5 and with the 32-bit SDL2_image 2.0.4 & 2.0.2.

While trying to figure out if it was a pysdl2 or SDL2_image problem, I dug into the source history and found this commit between 2.0.4 and 2.0.5 that looks like a likely culprit, a commit that adds support for 64-bit offsets in XCF files: https://hg.libsdl.org/SDL_image/rev/6536f264b1eb

Not sure how common XCF loading in SDL2 actually is, but I figured you'd want the heads-up!

On 2020-10-26 16:22:28 +0000, Ozkan Sezer wrote:

Reopened and dropped a note about this at
https://bugzilla.libsdl.org/show_bug.cgi?id=4413

On 2020-10-26 22:19:23 +0000, miniupnp@free.fr wrote:

OK, I think I understand what's going on.
XCF files normally have the version in their header, just like
00000000 67 69 6d 70 20 78 63 66 20 76 30 31 31 00 00 00 |gimp xcf v011...|

but this one has
00000000 67 69 6d 70 20 78 63 66 20 66 69 6c 65 00 00 00 |gimp xcf file...|

I think it should be interpreted as version 0

On 2020-10-26 22:33:59 +0000, miniupnp@free.fr wrote:

Created attachment 4486
patch for SDL2

On 2020-10-26 22:34:32 +0000, miniupnp@free.fr wrote:

Created attachment 4487
Patch for SDL1.2

On 2020-10-26 23:05:40 +0000, Ozkan Sezer wrote:

Thanks, patches applied.

SDL-1.2 branch: https://hg.libsdl.org/SDL_image/rev/bbbffe655cc8

Default branch: https://hg.libsdl.org/SDL_image/rev/80a5e1347ee6

Tested the default branch and seen that showimage does load XCFs.
@austin Hurst: Is it working for you? Shall I close this?

On 2020-10-31 17:24:13 +0000, Ozkan Sezer wrote:

Closing as fixed.

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

1 participant