drfrag666 / gzdoom

GZDoom adds an OpenGL renderer to the ZDoom source port.
http://gzdoom.drdteam.org
GNU General Public License v3.0
74 stars 16 forks source link

Cannot start LZDoom without config file #21

Closed alexey-lysiuk closed 3 years ago

alexey-lysiuk commented 3 years ago

If there is no config file, or if .ini doesn't contain particular sections, execution stops with Corrupt config file fatal error. Tried with f15f8101d2624daa3f6f69254d3e56ce30371795, most likely started with 54c27dd422e60518594a5e867309eea95c75b2b9.

drfrag666 commented 3 years ago

It should not happen when there's no config file. Even adding a !FileExisted check still errors out and i don't know why. I added those checks due to the partial reset of the configuration with multiple instances and after restarting even when a fix for the latter is on its way. It's the classic one writer multiple readers problem but with different processes. https://forum.zdoom.org/viewtopic.php?f=2&t=69693&start=60#p1183814

alexey-lysiuk commented 3 years ago

Execution is aborted if at least one expected section is missing. And they are missing because there is no config, and their creation is prohibited when calling FGameConfigFile::SetSection() function. It has nothing to do with restart button, multiple processes, etc.

drfrag666 commented 3 years ago

Thanks it's fixed, i put a reverse check oops.

drfrag666 commented 3 years ago

https://github.com/drfrag666/gzdoom/commit/35cabd566a7ac67efadce70dd09daa78652df8b6