View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003609||The Dark Mod||Tweaking||public||19.11.2013 22:54||26.05.2014 20:26|
|Product Version||TDM 2.00|
|Target Version||TDM 2.02||Fixed in Version||TDM 2.02|
|Summary||0003609: TDM crashes on startup if fms folder does not exist|
|Description||In case the fms folder does not exist, TDM will crash on startup.|
Instead TDM should tell the player that it could not find the fms folder, or even better, simply create it without asking.
When 2.0 was announced, people were asked to drop the entire fms folder in order to get rid of old missions.
The result for me was that TDM would simply crash and leaving it up to me figuring out what was going wrong.
|Steps To Reproduce||- delete the fms folder|
- start TDM
--> crash to desktop
|Tags||No tags attached.|
You should delete the folder before updating, not after. Otherwise you lose the Training Mission and St. Lucia.
Still would be nice if it gave a reason for the crash though.
Yeah, you are right about the sequence of deleting the fms folder.
But you know how precise the instructions sometimes are and how well players read them. :-)
Fixing the crashes is the easy part:
In CMissionManager::SearchForNewMods() ~line 320
and CMissionManager::GenerateModList() ~line 448
there are iterators over directories.
Adding the following code in those two methods right after the respective intial DM_LOG entry will fix the crashes.
Actually it forces a shutdown of TDM and prevents the player to continue to the download menu or some other place, which would not make any sense, since downloads would fail anyway.
DM_LOG(LC_MAINMENU, LT_ERROR)LOGSTRING("FM root folder does not exist: %s\r", fmPath.string().c_str());
gameLocal.Error("FM root folder does not exist: %s\rRun the tdm_update in order to restore it.\r", fmPath.string().c_str());
TDM would then exit with a console window as seen below.
Of course some nice dialog with an explicit message would be better, but that seems out of scope of the gamex86.dll and therefor nothing I could debug.
That console window is better then a crash anyways, since the gamma on my screen stays pretty high after a crash... and sometimes TDM is not really willing to die (and needs the CTRL-ALT-DEL salute despite of having crashed already).
|Hmmmm, this was meant to be fixed in some changes quite a while back. Let me dig into this a bit more.|
Hopefully the final time that I have to claim to have fixed the missing "fms" folder issue. darkmod_src r5992
Previous fixes missed the case where both the fms folder and the currentfm.txt file are missing (e.g. fresh install where the fms folder wasn't created correctly or was removed for some reason).
I will likely implement further checks in the game code to ensure that TDM doesn't crash if the fms folder is removed after TDM has been started (the current fix only does the check at game startup).
Implemented extra error checking for missing "fms" directory based on gnartsch's suggestion. I think there are sufficient checks for this now, finally.
|19.11.2013 22:54||gnartsch||New Issue|
|20.11.2013 01:28||Springheel||Note Added: 0006244|
|20.11.2013 01:29||Springheel||Note Edited: 0006244||View Revisions|
|20.11.2013 23:39||gnartsch||Note Added: 0006251|
|20.11.2013 23:46||gnartsch||Note Edited: 0006251||View Revisions|
|21.11.2013 23:18||gnartsch||Note Edited: 0006251||View Revisions|
|11.12.2013 10:33||taaaki||Note Added: 0006316|
|11.12.2013 10:44||taaaki||Relationship added||related to 0003351|
|22.01.2014 20:30||taaaki||Assigned To||=> taaaki|
|22.01.2014 20:30||taaaki||Status||new => assigned|
|09.05.2014 22:16||taaaki||Note Added: 0006597|
|09.05.2014 22:16||taaaki||Status||assigned => feedback|
|09.05.2014 22:16||taaaki||Note Edited: 0006597||View Revisions|
|09.05.2014 22:17||taaaki||Target Version||=> TDM 2.02|
|26.05.2014 20:26||taaaki||Note Added: 0006639|
|26.05.2014 20:26||taaaki||Status||feedback => resolved|
|26.05.2014 20:26||taaaki||Fixed in Version||=> TDM 2.02|
|26.05.2014 20:26||taaaki||Resolution||open => fixed|