GZDoom eats and overrides config files

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

GZDoom eats and overrides config files

Post by Major Cooke »

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
SanyaWaffles
Posts: 842
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: GZDoom eats and overrides config files

Post by SanyaWaffles »

So that explains why that happened to me the other night. I thought I was going insane.
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: GZDoom eats and overrides config files

Post by Major Cooke »

Yeah I did too. This is annoying. It happens so rarely though.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: GZDoom eats and overrides config files

Post by _mental_ »

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.
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: GZDoom eats and overrides config files

Post by Major Cooke »

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
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: GZDoom eats and overrides config files

Post by Major Cooke »

This bug is still an issue as of 4.5. Can I please reopen this? It happened to me just today.
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: GZDoom eats and overrides config files

Post by Rachael »

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
drfrag
Vintage GZDoom Developer
Posts: 3178
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: GZDoom eats and overrides config files

Post by drfrag »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom eats and overrides config files

Post by Graf Zahl »

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
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: GZDoom eats and overrides config files

Post by Accensus »

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
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: GZDoom eats and overrides config files

Post by Major Cooke »

I've been very consistent on just opening the console and typing "exit" in.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3178
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: GZDoom eats and overrides config files

Post by drfrag »

I never use that but certainly the code is different.

Code: Select all

CCMD (exit)
{
	if (!insave) throw CExitEvent(0);
}

Code: Select all

CCMD (exit)
{
	throw CExitEvent(0);
}
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: GZDoom eats and overrides config files

Post by InsanityBringer »

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
drfrag
Vintage GZDoom Developer
Posts: 3178
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: GZDoom eats and overrides config files

Post by drfrag »

If the file can't be read it assumes it doesn't exist:

Code: Select all

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
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: GZDoom eats and overrides config files

Post by Apeirogon »

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.
Post Reply

Return to “Closed Bugs [GZDoom]”