GZDoom eats and overrides config files
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.
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.
- 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
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.
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.
- 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
So that explains why that happened to me the other night. I thought I was going insane.
- 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
Yeah I did too. This is annoying. It happens so rarely though.
Re: GZDoom eats and overrides config files
You can start from here.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.
- 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
Unfortunately I haven't had much luck in tracking this issue. This is harder than I thought... Or maybe I'm overthinking it.
- 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
This bug is still an issue as of 4.5. Can I please reopen this? It happened to me just today.
Re: GZDoom eats and overrides config files
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3178
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: GZDoom eats and overrides config files
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.
In LZDoom the code in FGameConfigFile::FGameConfigFile () is exactly the same so the problem must be somewhere else.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: GZDoom eats and overrides config files
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?
This sounds like GZDoom for some reason cannot open the INI - so what may block it?
Re: GZDoom eats and overrides config files
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.
- 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
I've been very consistent on just opening the console and typing "exit" in.
- drfrag
- Vintage GZDoom Developer
- Posts: 3178
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: GZDoom eats and overrides config files
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);
}
- InsanityBringer
- Posts: 3392
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: GZDoom eats and overrides config files
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3178
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: GZDoom eats and overrides config files
If the file can't be read it assumes it doesn't exist:
And FConfigFile::ReadConfig is different in both versions.
Code: Select all
void FConfigFile::LoadConfigFile ()
{
FileReader file;
bool succ;
FileExisted = false;
if (!file.OpenFile (PathName))
{
return;
}
succ = ReadConfig (&file);
FileExisted = succ;
}
Re: GZDoom eats and overrides config files
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.
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.