Crash to Desktop

Unsure where to put this, but I’ll just put this here:
On startup of the game I get the splash screen for a few seconds, then I’m met with this error message:

My debug.txt reads:
[17:52:4:814]- ----DEBUG FILE----
[17:52:4:814]- Windows 7 detected
[17:52:4:814]- Game version: 1.129
[17:52:4:814]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini : 2
[17:52:4:814]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini]
[17:52:5:98]- Desktop resolution is 3840 x 2160
[17:52:5:99]- GEngine::Init Engine mode: 3840x2160
[17:52:5:99]- GEngine::Desktop mode: 3840x2160
[17:52:5:99]- Matching desktop res
[17:52:5:99]- Calling SDL_CreateWindow: 3840x2160@0 [fullscreen]
[17:52:6:693]- Attempting to initialise steam
[17:52:6:804]- Steam initialisation success
[17:52:6:805]- Checking steam workshop subscriptions…
[17:52:6:808]- Requesting steam stats…
[17:52:6:808]- …Steam stats requested
[17:52:6:809]- Initialising 3D Engine
[17:52:6:850]- OpenGL Vendor : NVIDIA Corporation
[17:52:6:850]- OpenGL Renderer: GeForce RTX 2070/PCIe/SSE2
[17:52:6:850]- OpenGL Version : 4.6.0 NVIDIA 456.71
[17:52:6:851]- Initialising global vertex buffer
[17:52:7:176]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini : 2
[17:52:7:176]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini]
[17:52:7:769]- VE Clearing existing textures to replace with new [3840]x[2160]
[17:52:12:703]- PANGO context font map font families:
[17:52:12:703]- Noto Sans CJK SC
[17:52:12:703]- Noto Sans
[17:52:12:703]- Sans
[17:52:12:703]- Serif
[17:52:12:703]- Monospace
[17:52:12:721]- Initialising Sound Engine

I’ve attempted to delete the \My Games\Democracy4 folder, disable AV during reinstall of the game, reinstall all avail C++ redists, start Democracy4 as admin, reinstall display driver, reduce resolution to 1920*1080, change the resolution in prefs.ini directly… all fails. Any ideas guys?

EDIT:
In an attempt to troubleshoot, I installed the standalone version (not Steam) from the humble bundle page. This does not give me this error. It still crashes to desktop after a few secs of the splash screen though. The debug.txt generated from that reads as:
[18:29:32:127]- ----DEBUG FILE----
[18:29:32:127]- Windows 7 detected
[18:29:32:127]- Game version: 1.129
[18:29:32:128]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini : 2
[18:29:32:128]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini]
[18:29:32:348]- Desktop resolution is 3840 x 2160
[18:29:32:348]- GEngine::Init Engine mode: 3840x2160
[18:29:32:348]- GEngine::Desktop mode: 3840x2160
[18:29:32:349]- Matching desktop res
[18:29:32:349]- Calling SDL_CreateWindow: 3840x2160@0 [fullscreen]
[18:29:32:775]- Attempting to initialise steam
[18:29:32:953]- Steam initialisation failed
[18:29:32:953]- Initialising 3D Engine
[18:29:32:975]- OpenGL Vendor : NVIDIA Corporation
[18:29:32:975]- OpenGL Renderer: GeForce RTX 2070/PCIe/SSE2
[18:29:32:975]- OpenGL Version : 4.6.0 NVIDIA 456.71
[18:29:32:976]- Initialising global vertex buffer
[18:29:33:172]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini : 2
[18:29:33:172]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini]
[18:29:33:517]- VE Clearing existing textures to replace with new [3840]x[2160]
[18:29:38:364]- PANGO context font map font families:
[18:29:38:364]- Noto Sans CJK SC
[18:29:38:364]- Noto Sans
[18:29:38:364]- Sans
[18:29:38:364]- Serif
[18:29:38:364]- Monospace
[18:29:38:383]- Initialising Sound Engine

EDIT 2

Windows Event Viewer shows this error:
Faulting application name: Democracy4.exe, version: 0.0.0.0, time stamp: 0x5f901cd4
Faulting module name: MSVCR120.dll, version: 12.0.40664.0, time stamp: 0x5926098c
Exception code: 0xc0000409
Fault offset: 0x000a7646
Faulting process id: 0x7458
Faulting application start time: 0x01d6ac94586525f3
Faulting application path: C:\Program Files (x86)\Democracy 4\Democracy4.exe
Faulting module path: C:\WINDOWS\SYSTEM32\MSVCR120.dll
Report Id: 305a25bb-6255-4914-8ccc-4ad224324cda
Faulting package full name:
Faulting package-relative application ID:

This seems to be sound card related. What sound card do you have, and does it have the latest drivers?

Hi, I don’t have a dedicated sound card. My motherboard (ASUS ROG Strix Z390-F GAMING) has an integrated sound card, and yes it has the latest drivers. However, I do have a Corsair Void headset, and yes, that has the latest drivers too. I’ve also tried output thru my Razer Chroma Speakers, with no success.

Hmmm. this is very annoying. I’ve noticed a few people with the same error, but I cannot think what the cause is, as we actually use middleware for our sound system (irrklang) and simply use the default options. The debug logs have been improved with the latest version of the game, can you paste the debug log from the new version (1.131).

[1:15:28:238]- ----DEBUG FILE----
[1:15:28:239]- Windows 7 detected
[1:15:28:239]- Game version: 1.131
[1:15:28:239]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini : 2
[1:15:28:239]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini]
[1:15:28:576]- Desktop resolution is 3840 x 2160
[1:15:28:576]- Loaded Config: 3840x2160@0 [windowed]
[1:15:28:576]- GEngine::Init Engine mode: 3840x2160
[1:15:28:577]- GEngine::Desktop mode: 3840x2160
[1:15:28:577]- Matching desktop res
[1:15:28:577]- Calling SDL_CreateWindow: 3840x2160@0 [fullscreen]
[1:15:28:935]- Attempting to initialise steam
[1:15:29:924]- Steam initialisation success
[1:15:29:925]- Checking steam workshop subscriptions...
[1:15:29:927]- Requesting steam stats...
[1:15:29:927]- ...Steam stats requested
[1:15:29:928]- Initialising 3D Engine
[1:15:29:949]- OpenGL Vendor  : NVIDIA Corporation
[1:15:29:949]- OpenGL Renderer: GeForce RTX 2070/PCIe/SSE2
[1:15:29:950]- OpenGL Version : 4.6.0 NVIDIA 457.09
[1:15:29:952]- Initialising global vertex buffer
[1:15:30:158]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini : 2
[1:15:30:158]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini]
[1:15:30:729]- VE Clearing existing textures to replace with new [3840]x[2160]
[1:15:35:566]- PANGO context font map font families:
[1:15:35:566]- Noto Sans CJK SC
[1:15:35:566]- Noto Sans
[1:15:35:566]- Sans
[1:15:35:566]- Serif
[1:15:35:567]- Monospace
[1:15:35:582]- Initialising Sound Engine

Sorry, I don’t know how I never got a notification for this post :frowning:
Does it work in the latest build?

No worries, yeah, I still get the same error.
Logfile looks the same

“[12:27:3:568]- ----DEBUG FILE----
[12:27:3:568]- Windows 7 detected
[12:27:3:568]- Game version: 1.16
[12:27:3:568]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini : 2
[12:27:3:568]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/mod_status.ini]
[12:27:3:913]- Desktop resolution is 3840 x 2160
[12:27:3:913]- Loaded Config: 3840x2160@0 [windowed]
[12:27:3:913]- GEngine::Init Engine mode: 3840x2160
[12:27:3:913]- GEngine::Desktop mode: 3840x2160
[12:27:3:913]- Matching desktop res
[12:27:3:913]- Calling SDL_CreateWindow: 3840x2160@0 [fullscreen]
[12:27:4:595]- Attempting to initialise steam
[12:27:5:374]- Steam initialisation success
[12:27:5:374]- Checking steam workshop subscriptions…
[12:27:5:409]- Requesting steam stats…
[12:27:5:409]- …Steam stats requested
[12:27:5:409]- Initialising 3D Engine
[12:27:5:428]- OpenGL Vendor : NVIDIA Corporation
[12:27:5:428]- OpenGL Renderer: GeForce RTX 2070/PCIe/SSE2
[12:27:5:428]- OpenGL Version : 4.6.0 NVIDIA 460.79
[12:27:5:430]- Initialising global vertex buffer
[12:27:8:287]- Failed to open file: C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini : 2
[12:27:8:287]- GBufferedFile failed to open file [C:\Users\henri\OneDrive\Documents/My Games/democracy4/stats.ini]
[12:27:8:400]- Initialisizng Vector Engine
[12:27:8:720]- Setting vector Engine Dimensions
[12:27:8:730]- VE Clearing existing textures to replace with new [3840]x[2160]
[12:27:8:734]- Initializing Text
[12:27:8:735]- Creating font config
[12:27:8:735]- font config created
[12:27:8:735]- adding font directory
[12:27:9:13]- font map created
[12:27:9:13]- creating pango layout
[12:27:9:26]- pango layout created
[12:27:9:26]- PANGO context font map font families:
[12:27:9:26]- Noto Sans
[12:27:9:26]- Sans
[12:27:9:26]- Serif
[12:27:9:26]- Monospace
[12:27:9:42]- Initializing Input
[12:27:9:42]- Initializing sound
[12:27:9:42]- Initialising Sound Engine”

Dang. This looks definitely sound card related to me. Do you have any sound card specific software installed? if its a laptop, it likely has some totally useless and problematic crapware bundled with it for no reason. For example my asus laptop has some nonsense called ‘smart audio’ installed that seems designed to make my sound quieter and generally worse…
If you do find any pre-installed software like that, its always worth disabling it, or turning off any ‘enhancements’ or ‘features’. They cause absolute mayhem with stability.

Nope, I have a desktop computer, and I don’t have similar issues elsewhere. As previously said, I don’t have a dedicated sound card, not that that should have much to do with it, as all motherboards these days have onboard sound cards. The sound drivers I currently have installed are NVIDIA’s and Corsair’s drivers. As this is a once custom built PC, there has never been any unwanted junk installed on the computer.

It’s also worth saying that I have tried this with all non-microsoft services disabled, w/o luck.

When I say sound card, i’m just meaning the sound hardware, which I know is on-motherboard in this case. The game even tries 3 different ways of generating sound, to ensure that one of them works ok, so I am at a loss to work out why it can hard crash simply when connecting to the sound driver :(.
I will take another look at the code to see if there is a way to get an error message regardless what happens when we initialize sound.

I have an idea… am working on a quick update…

Actually can you try this:

open up the file \my documents\my games\democracy 4\prefs.ini

Add a line that says this:
sound driver = ESOD_DIRECT_SOUND

Then run the game again. if that doesnt fix it, replace that line with
sound driver = ESOD_DIRECT_SOUND_8

or try
sound driver = ESOD_WIN_MM

or
sound driver = ESOD_NULL

If NONE of those work, I’m pretty much out of ideas.

Nope, still getting runtime errors. What’s interesting is that suddenly, I got an errors.txt-log. It has the following contents:
“27/10/2020 - 20:16 - Failed to initialise 3D Engine:D:\programming\democracy 4\builds\Democracy4\src_all_operating_systems\app\app_game.cpp 284
27/10/2020 - 20:16 - First run crash detected, switching to windowed mod automagically
27/10/2020 - 20:17 - Failed to initialise 3D Engine:D:\programming\democracy 4\builds\Democracy4\src_all_operating_systems\app\app_game.cpp 284
27/10/2020 - 20:17 - First run crash detected, switching to windowed mod automagically
15/12/2020 - 12:27 - Shader not found: greyscale.fx
16/12/2020 - 14:27 - Shader not found: greyscale.fx
16/12/2020 - 14:27 - Shader not found: greyscale.fx
16/12/2020 - 14:28 - Shader not found: greyscale.fx
16/12/2020 - 14:29 - Shader not found: greyscale.fx”

EDIT: Nevermind, I guess that’s been there the whole time, ref the dates

Thats a bit worrying though to have ever got those errors :frowning:
Does the game start up and draw the splashscreen ok before it crashes now though?

It seems like something about your sound card must be set wrong. Thats every possible way off playing sound on a PC, and they all fail :frowning:

Yup, I get the splash screen before it crashes, ref the picture in the first post in this thread. The errors from 27/10 are just from myself attempting to troubleshoot by uninstalling runtimes etc.

And it is quite weird that it’s not working. I have never noticed any similar problems on other games, not even Democracy 3 gives any errors (I guess they run on different engines either way, so it’s probably not relevant).

Also, I think it’s weird that the Steam version gives me an error, but standalone version doesn’t give me an error at all. It just CTDs.

Actually they use the same sound engine exactly, which does make it super weird. its a 3rd party system called irrklang, used in hundreds of games.

Uhm…Yeah, that sounds really weird…

Just out of curiosity, I tried installing and running the game on two of my laptops as well, with the exact same outcome: Runtime error w/ the same log output.

I got something like this for a while but assumed it was my own computer on the fritz. It stopped when I unsubscribed from some workshop mods I’d installed. Do you have any mods? Maybe try that if so.