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!

GZDoom eats and overrides config files

Postby Major Cooke » Wed Aug 26, 2020 5:11 pm

In order to investigate this, I'm going to need to find where and when GZDoom begins and writes out a new INI file, if it fails to find and/or read an INI file.

This bug is completely sporadic, so I suspect something isn't initializing properly when it happens. Ever since the new fullscreen variable was introduced, somewhere around that time, I've encountered moments of starting up where it just completely disregards the INI previously made and wipes it out.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: GZDoom eats and overrides config files

Postby SanyaWaffles » Wed Aug 26, 2020 6:08 pm

So that explains why that happened to me the other night. I thought I was going insane.
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 Major Cooke » Wed Aug 26, 2020 6:57 pm

Yeah I did too. This is annoying. It happens so rarely though.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: GZDoom eats and overrides config files

Postby _mental_ » Thu Aug 27, 2020 5:41 am

Major Cooke wrote:In order to investigate this, I'm going to need to find where and when GZDoom begins and writes out a new INI file, if it fails to find and/or read an INI file.

You can start from here.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: GZDoom eats and overrides config files

Postby Major Cooke » Sat Sep 26, 2020 3:32 pm

Unfortunately I haven't had much luck in tracking this issue. This is harder than I thought... Or maybe I'm overthinking it.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: GZDoom eats and overrides config files

Postby Major Cooke » Wed Nov 04, 2020 9:47 am

This bug is still an issue as of 4.5. Can I please reopen this? It happened to me just today.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: GZDoom eats and overrides config files

Postby Rachael » Wed Nov 04, 2020 10:30 am

I think what should be done going forward is making automatic backup copies of the configuration files, even if they end up being shoved into a folder.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
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 » Wed Nov 04, 2020 10:43 am

I don't think LZDoom is affected, this has never happened to me. I wonder since when this is a thing but must be something recent.
In LZDoom the code in FGameConfigFile::FGameConfigFile () is exactly the same so the problem must be somewhere else.
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 » Wed Nov 04, 2020 10:53 am

Same here. I never ever lost a config file so it should be examined what other contributing factors may be there.
This sounds like GZDoom for some reason cannot open the INI - so what may block it?
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 Accensus » Wed Nov 04, 2020 11:38 am

Just to make sure, you're not closing GZDoom while it's loading, right? Because I'm 99% sure that's what's causing GZD to eat my config files. You just have to time it reaaaaally carefully to trigger that. 10/10 times it's happened to me while I was opening and closing GZDoom all the time while modding. Haven't had a config get eaten ever since I started waiting for it to launch properly before closing it if I opened it by accident.
User avatar
Accensus
Vector, locked in.
 
Joined: 11 Feb 2016
Location: Somalia
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 Major Cooke » Wed Nov 04, 2020 11:57 am

I've been very consistent on just opening the console and typing "exit" in.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: GZDoom eats and overrides config files

Postby drfrag » Wed Nov 04, 2020 1:09 pm

I never use that but certainly the code is different.
Code: Select allExpand view
CCMD (exit)
{
   if (!insave) throw CExitEvent(0);
}

Code: Select allExpand view
CCMD (exit)
{
   throw CExitEvent(0);
}
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 InsanityBringer » Wed Nov 04, 2020 1:49 pm

The last time I had it happen, I used the new relaunch button on script errors. I've also had it happen in a few cases when closing the startup window when the game is launching because I started it up twice by accident or something.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: GZDoom eats and overrides config files

Postby drfrag » Wed Nov 04, 2020 2:54 pm

If the file can't be read it assumes it doesn't exist:
Code: Select allExpand view
void FConfigFile::LoadConfigFile ()
{
   FileReader file;
   bool succ;

   FileExisted = false;
   if (!file.OpenFile (PathName))
   {
      return;
   }

   succ = ReadConfig (&file);
   FileExisted = succ;
}

And FConfigFile::ReadConfig is different in both versions.
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 Apeirogon » Wed Nov 04, 2020 4:18 pm

It then should create new gzdoom_<user name>.ini file.
Problem is, it eats/override existing ini file. I have my ini file renamed to gzdoom_portable.ini and Gzdoom still sometimes (rarely) corrupt it. I mean, if it was just "du du dudu....cant find/read ini file, well create new one then....gzdoom.get_name() + _ + windows.get_user_name()", as it should by default, but no, Gzdoom aware that it should use _portable name as a name for the "new" ini file.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Next

Return to Bugs

Who is online

Users browsing this forum: boris and 0 guests