Why a game can crash?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By koop27
:warning: Old Version Published before Godot 3 was released.

Hello,
I started a project whit godot since a couple of month. I have a problem I can’t solve. My game crash, I don’t know why?
There is no help or indication from the engine.
Anyone know why a game can crash? Commons Problems that I can check, like infinity loop or access to the wrong memory?

For more indication:
The game crash always at the same moment of the game but not every time.
It crash when it meet a yield() after I reload the scene with the method from the tutorial: Singletons
The fist load work every time.

:bust_in_silhouette: Reply From: dc1a0

The game can completely crash even in the debugger for several reasons. Not only the reasons you suggested, but also for things like severe Out Of Bounds errors. The best way I’ve found to determine what it is is to run Godot through a terminal window. Ignore the normal errors it my generate, and trace back the errors after you run the game in debugger and it crashes. This will allow you to scroll up the errors to see what in the engine broke and a good bit of the time what line of what script caused the failure to cascade into a crash.

Thanks, but here is the result:

shit?: No error
ERROR: read: Server disconnected!

At: platform/windows/stream_peer_winsock.cpp:210

I guess I have to look deeper into my code.

koop27 | 2016-02-29 22:36

I think for windows, there may be something else you may need to get the terminal to do that, but I don’t remember what. Using an Ubuntu Linux variant, all I need to do is run the terminal and every minor error gets printed to that terminal window. Sorry I can’t be of more help with a windows system but I try to deal with that platform as little as possible these days.

dc1a0 | 2016-03-01 06:00

:bust_in_silhouette: Reply From: koop27

I fixed the problem. Apparently I didn’t make a good use of the function: “_process”. A “_fixed_process” was more efficient.
Thanks!

Can you please share with us how use of _process instead of _fixedprocessed can cause engine to crash? It is good to know things that I definitively should avoid in some of my future projects ;).

lukas | 2016-03-02 13:36

Yes, it would be good to know how a crash could happen because of this.

chanon | 2016-03-02 23:37

Currently, I don’t know why.
I just know that I set “false” the process of a node. After the game didn’t crash anymore. So I changed for a _fixed_process and the result was the same.

koop27 | 2016-03-03 12:47