microsoft/GDK

XGameRuntimeInitializeWithOptions causes E_GAMERUNTIME_GAMECONFIG_BAD_FORMAT error

Closed this issue · 2 comments

The following call causes E_GAMERUNTIME_GAMECONFIG_BAD_FORMAT (gameConfig is a C string containing the MicrosoftGame.config file):

XGameRuntimeOptions options = {};
options.gameConfigSource = XGameRuntimeGameConfigSource::Inline;
options.gameConfig = gameConfig;
XGameRuntimeInitializeWithOptions(&options);

Sometimes (like 1 out of 10 times) this call succeedes but the other 9 times you get this error. The call is totally unstable.

What edition are you using (including QFE number)?

It seems the problem has been caused by the game config editor tool injecting BOM UTF8 at the start of the written file. Deleting the invisible BOM sequence from the file with a hex editor fixes the problem.