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

PhysFS_init now returns 0 in 5.2.5 #1029

Closed
Giacom opened this issue Mar 12, 2019 · 8 comments
Closed

PhysFS_init now returns 0 in 5.2.5 #1029

Giacom opened this issue Mar 12, 2019 · 8 comments

Comments

@Giacom
Copy link

Giacom commented Mar 12, 2019

Hi, I just recently upgraded my Allegro project from 5.2.4 to 5.2.5.

I cannot get PhysFS to initialise. Before it worked just fine but now it will return 0, the error code for unsuccessfully initialising, without including any error code in getLastError or getLastErrorCode.

I'm developing on Windows 10 64-bit and downloaded Allegro through nuget.

I was able to workaround this problem by replacing my physfs.lib and physfs.h with the version from 5.2.4.

@Giacom Giacom changed the title PhysFS_init returns 0 PhysFS_init now returns 0 in 5.2.5 Mar 12, 2019
@SiegeLord
Copy link
Member

So the difference between the two Nuget packages is that we upgraded PhysFS from 2.0.3 to 3.0.1.

It looks like this is the issue described here: https://icculus.org/pipermail/physfs/2018-October/001274.html.

What I'll do is patch in the fix here (https://hg.icculus.org/icculus/physfs/rev/ece6769c0676) and push out a new version of the deps + allegro.

Thanks for reporting this!

@dos1
Copy link
Contributor

dos1 commented Mar 13, 2019

@@ -575,7 +574,7 @@
          *  psize. Also note that the second parameter can't be
          *  NULL or the function fails.
          */
-        rc = pGetDir(accessToken, &dummy, &psize);
+        rc = pGetDir(accessToken, NULL, &psize);

Love that comment :D

@fatcerberus
Copy link
Contributor

I'm very confused by the patch - the comment (as @dos1 points out) says the second parameter can't be NULL and yet the fix was to pass NULL for that very parameter? What?!

@dos1
Copy link
Contributor

dos1 commented Mar 13, 2019

It just seems to be pretty confusing piece of code. The commit message mentions API change in Windows 10, while the code itself actually seems to want this function to fail.

It's funny nevertheless ;)

@icculus
Copy link

icculus commented Mar 13, 2019

Yeah, it's a mess. The NULL comment is due to Windows 95 requirements, which aren't a going concern anymore. I'm going to try to push a PhysicsFS 3.0.2 shortly to resolve this.

@SiegeLord
Copy link
Member

Ah, awesome. I'll just wait for the 3.0.2 and upgrade to that.

@icculus
Copy link

icculus commented Mar 19, 2019

The NULL comment is due to Windows 95 requirements

Actually, it appears to be something that affects at least WinXP, but only if you build with an older Visual Studio...it's a mystery. I released PhysicsFS 3.0.2 today with something that works with both win32 behaviors: https://icculus.org/pipermail/physfs/2019-March/001280.html

@SiegeLord
Copy link
Member

Alright, I've uploaded package version 5.2.5.1 with PhysFS 3.0.2. Things should work now.

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

5 participants