Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I observed that the godot editor is not really protected against errors that happen in plugins, @tool scripts or other such places(and if you use GDExtension, it also behaves like a tool script). So if one of them crashes or freezes, it will cause crash/freeze of the editor, too.
And with errors that result in editor crash you have similar problem - suppose you catch the error that the faulty script has caused, what do you do now? The error has already happened at this point, and you have to assume that the editor state is already compromised, so the only sensible action it can take is to crash anyway.
And it's not like godot editor invented the concept of allowing the user to reprogram itself while it is running. Every other program that I know that has the same mechanism runs into the same problems. There is no known cure, and the only thing you can do is to be very careful.
It is not even theoretically possible to distinguish program that froze from one that just takes a bit longer to finish its task, because the general case is the halting problem. In some more specific scenarios, you can do static code analysis to try catch issues like the one you mentioned, but it will never detect every possible problem, and the static analysis itself is very hard even if you limit yourself to some common cases.
And just swallowing exceptions is a very bad idea. You don't know why the exception happened, what caused it, and most likely the program state is corrupted and unusable. The *only* sensible thing to do in this situation is to crash, maybe with a little more fanfare, otherwise you will suffer any kind of undefined behavior, data loss included.