Problem with Export for Windows runnable

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

Hi All. When exporting the game to windows runnable (Win10) using the latest templates the game doesn’t work properly. Roughly 50% of the game simply doesn’t work as if scripts were missing. It works fine in debug but not after exporting. Any tips?

Actually it’s not just Windows. Just tried exporting to osx - same problem. Half the game just doesn’t work. When I export with debug it works as expected (but of course I don’t want the debug console when exporting a game…).

Macryc | 2020-07-26 14:48

:bust_in_silhouette: Reply From: Macryc

OK I think I’ve got this. I searched the web for similar problems and found this thread on github: Game runs in Godot but crashes when built. How can I debug the problem of the built version? · Issue #6961 · godotengine/godot · GitHub

Did’t make much sense of it but I noticed ‘assertion failed’ on the screen shot. I remembered using assert to connect signals to buttons (I don’t remember why - I think I had a problem previously with signals not connecting and someone suggested using assertions). Anyway, I removed the assertions and re-exported the game. It’s working fine now. I read a little more and found that assertions only work in debug, so it kind of makes sense now…