Release versions of game crash when an error occurs

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

Basically any error makes the application crash when it’s exported in a non-debug version. While it’s totally clear that we should make the game as much error-less as possible, doesn’t this behavior contradict the engine philosophy presented by Juan here and here?

Here’s a really simple example of intentionally bad code that results in a crash:
crashity crash

This is Godot 3.1 in its stable version with up-to-date export templates.

:bust_in_silhouette: Reply From: Holm

I think it should be the developer’s job to do a null test of a result. :wink:

Well, sure, I too dream of an ideal world where developers anticipate every scenario and write 100% errorproof code. :wink:
Realistically though, it’s still highly possible, given that game projects tend to be quite large in scale, to have some scenarios uncovered, like when using yields extensively and irensponsibly. And I remember Juan talking multiple times about letting programmers to write “quick and dirty” code.
So the question is more about divergence in what the main engine dev says and how the engine actually work.

rzuf | 2019-08-26 12:30

I think I know what you mean. It’s always a compromise between overhead and performance. Checking data and variables in the normal running scope is one thing - another thing to do with dynamic objects. I’m not even talking about multithreading here. Coding “Quick and dirty” sometimes just means being able to write code quickly - but not all time safe.

Holm | 2019-08-26 12:50