hw2log and general debugging of missing references

Maybe I have been missing something that is easier or a command line switch but the only debugging log that seems to have information is the hw2log file, it seems like there are a lot of exceptions that are not handled gracefully in the game and in many cases nothing is returned to the log file. Most of the time I get an access violation with nothing written in the log.

I can understand when an explicit reference is not found that the game has to stop execution if there is not try/catch to gracefully handle the error, and that many other errors would be a lot harder to detect since it may be improper value types, but anything that could help find the source of issues would be great. It isn’t so much of an issue when a mod is first started since everything is new, but once a mod has many objects and files it is very difficult to backtrack and find the source of a crash (one weapon on one ship that you normally don’t build for example and the AI does)

It would be helpful at minimum if the exceptions could dump the object type they failed on loading (ship, subsystem, weapon, art, sound, etc)

In an ideal state an appropriate dummy object would be loaded that is ‘safe’ and the game would continue on without a CTD (MISSING ASSET message inserted into log), but I doubt we’ll ever get that far


If for whatever reason those suggestions aren’t viable, something else that might do the trick is to have an extra-verbose logging flag that writes out what it’s about to try to load for every single thing, so if it trips and falls you know where. Similar effect, but perhaps more failsafe.

1 Like