GZDoom eats and overrides config files

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Re: GZDoom eats and overrides config files

Postby JPL » Sun Nov 15, 2020 5:37 pm

Just in case it's a useful data point and without speculating as to causes, I've been running GZDoom from Linux for over 10 years and I've never seen this issue.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: GZDoom eats and overrides config files

Postby drfrag » Tue Nov 17, 2020 4:00 am

A question for people experiencing this issue, do you have any third party antivirus software installed and which one?
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby SanyaWaffles » Tue Nov 17, 2020 5:54 am

I have Malwarebytes installed, however I don't have the realtime protection enabled. I find that stuff intrusive.
User avatar
SanyaWaffles
Wouldn't be an epic gamer if I didn't commit a few war crimes.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: GZDoom eats and overrides config files

Postby drfrag » Tue Nov 17, 2020 6:21 am

I also have that antimalware installed, must be something else. Seems this is a windows only problem after all so a simple _stat check would do then.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby drfrag » Tue Nov 17, 2020 11:22 am

First i did the _stat version but then i upgraded it to C++ 17, PR here: https://github.com/coelckers/gzdoom/pull/1235
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby Graf Zahl » Tue Nov 17, 2020 11:43 am

GZDoom already has a stat based FileExists function. Please use that. std::filesystem is not available on macOS 10.14 and lower so thanks to Apple being dicks we can't use it for the time being.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: GZDoom eats and overrides config files

Postby Caligari87 » Tue Nov 17, 2020 11:53 am

Sorry if this disrupts the path to the bug, I do want to briefly chime in and say this has happened to me at least once on Linux earlier this year. Weirdly, it resulted in a partial overwrite of my settings (some were preserved, some set to defaults). I have no idea why it happened and haven't been able to reproduce it.

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: GZDoom eats and overrides config files

Postby drfrag » Tue Nov 17, 2020 2:15 pm

User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby drfrag » Wed Nov 18, 2020 1:25 pm

Seems it's fixed in the PR but now i've found another issue on windows and it's potentially very serious. It's about the _stat function, it's broken and it's used by FileExists. If you remove the permissions (or it's blocked by something else) _stat returns -1 like if the file didn't exist. I'm using VS 2017 but i think it also happens in 2019 (_mental_ has reported it). I've confirmed that the internal version works properly with the PR, it's still in GZDoom guarded by #ifdef USING_V110_SDK71 and it's _wstat64i32 but now GZDoom uses _wstat64 instead. I don't know what would be a better solution here, either using the internal version or fileSystem::exists on windows.
Last edited by drfrag on Sat Nov 21, 2020 5:39 am, edited 1 time in total.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby drfrag » Sat Nov 21, 2020 5:37 am

Having a look at the source at least you can't lose savegames so may be it's not that bad. There are two completely different FileExists functions and the _stat problem is in DirEntryExists and that one is used by BaseFileSearch , D_AddFile and AddFile (besides the uses of FileExists itself). So what should i do now? Probably it's better to upgrade to filesystem::exists in FileExists for now on windows only and later do the transition for other OSes (stat works there).
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby drfrag » Sat Nov 21, 2020 1:25 pm

I've done it but now i'm not so sure the "upgrade" to <filesystem> was such a good idea. For filesystem::last_write_time you can't convert from file_time_type to time_t until C++ 20, on the other side the time parameter is unused in GetFileInfo so i could just change the specification.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: GZDoom eats and overrides config files

Postby drfrag » Sat Nov 21, 2020 2:50 pm

Done another PR, the alternative would be to use the internal _stat function and change it to use 64 bit file sizes. Or report the bug to Monkeysoft and wait for VS 2021.
https://github.com/coelckers/gzdoom/pull/1237
Edit: closed it and opened https://github.com/coelckers/gzdoom/pull/1238
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Previous

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest