-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Expose OS.disable_crash_handler() for extensions #108268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Expose OS.disable_crash_handler() for extensions #108268
Conversation
I think exposing a method is an overkill. It could be a project setting This is also how accessibility related functions are disabled. You can run your application with the |
I was considering a project setting approach and I think it has substantial drawbacks. We wouldn't be able to automate this process during launch, because by the time we can change this setting, it's already too late. We'd have to prompt users to change this setting and it will be subject to human error. The other downside, is that it would have to be two settings, one for the exported project and another one for the editor because we also support running our extension within the editor as well. In my opinion, the least disruptive change would be to add an API method. Let me know what you think! |
Yeah, I agree exposing Beside that, I think there are several things mixed up here:
|
The problem is that defining multiple crash handlers is poorly supported across frameworks and may cause issues that are hard to deal with. You can read more about it here. There are frameworks that allow chaining crash handlers, but it requires explicit coordination betwene them, usually by chaining inside a single registered handler.
I think putting this on users shoulders is not great UX. It's more of a workaround. We're making extension that helps debugging shipped games, and having things working out-of-the-box is highly desirable.
We can do that, and I'm not against it. I submitted this version, because I think the API method is a slightly better approach.
It's not enabled by default. This is reserved for specialized use-cases where the editor is the product (forks that want to ship with the extension). |
@@ -92,6 +92,12 @@ | |||
[b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). | |||
</description> | |||
</method> | |||
<method name="disable_crash_handler"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd name it disable_default_crash_handler. or "built-in"
Since this could seem to indicate, otherwise, that all crash handlers would be disabled. While the intent is to disable only the built in so another can be registered instead.
Allow disabling crash handler from GDExtension API.
We’ve stumbled upon a bit of a problem in Sentry SDK. It seems that Linux builds aren’t shutting down properly when they crash. The process gets stuck running indefinitely after the crash. This PR would allow us to unregister Godot's crash handler and use ours instead.
We'd really appreciate if this could be added to version 4.5. It can be a real pain in some scenarios, like dedicated servers not automatically restarted because the process gets stuck. It's a relatively simple change.