REGoth-project / REGoth

OpenSource-Reimplementation of the zEngine, used by the game "Gothic"
GNU General Public License v3.0
630 stars 63 forks source link

Loading VDF crash Win 10 #369

Open mineas312 opened 5 years ago

mineas312 commented 5 years ago

When I try to start the game, it closes immediately. Console output:

Output

The crash is caused in a function char * __PHYSFS_platformCalcUserDir(void) in file physfs_platform_windows.c

This element of code should fail but it doesn't. Second parameter is set to '\0'

/*
         * Should fail. Will write the size of the profile path in
         *  psize. Also note that the second parameter can't be
         *  NULL or the function fails.
         */
        rc = pGetDir(accessToken, &dummy, &psize);
        GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done);  /* should have failed! */

Later it causes access violations and game crashes.

frabert commented 5 years ago

Hi! Thanks for the report, may I ask you which release are you experiencing this on? This looks like a bug with PhysFS, so I'm going to need to do some investigation before forwarding to their mailing list

ErrorFlexXx commented 5 years ago

I remember a bug in Physfs, which could be experienced on windows 10 systems. https://github.com/Didstopia/physfs/commit/fe12df08508044287aba2317e13cd91596af5af1 It has been fixed a while ago.

A switch to a newer Physfs mirror should solve this problem. Edit: I'll setup a branch to test, if we can switch the physfs version without problems or not.

Just saw, we are using an own Mercurial copy of physfs. @frabert what do you think about switching to an automated mercurial clonging git repo like Didstopia ? Would it be worth to use this ?

frabert commented 5 years ago

My top preference would be to actually write a CMake script to find any existing PhysFS install or point it to where a build exists, rather than using a submodule. In absence of that, if the git repo is updated quickly enough it is fine for me