-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add Crash Handler for iOS Platform #11544
Comments
Capturing signal and calling |
This would be great, but I just noticed that crash handler is only enabled for debug. This is useful, but not quite what I'm looking for. Maybe I missed some other way to enable this?
What I'd like is a way to log crashes from the Godot engine and crashes from GDScript in release builds for iOS & Android. Something similar to Firebase Crashlytics, Sentry, or the default Apple Crash logs. A generic solution could be to use NOTIFICATION_CRASH and then produce a backtrace. Then devs could pass this along to analytics of their choice or ignore. This looks promising: godotengine/godot#91006 Searching more, I'm finding similar requests and PRs: |
Currently, Apple is collecting a crash log, but it's not very useful for debugging. I imagine that if I added Crashlytics, then I'd get similarly unhelpful reports in the current state. Click to expand Crash Log
|
You do get a backtrace within that crash log (near the beginning). It's actually quite useful in its current state 🙂 However, in production, your game won't have debug symbols, so you'd need a way to symbolize a crash backtrace with a local copy of the debug symbols that matches the binary used in production. |
This is true, but definitely room for improvement 😄 specifically seeing the GDScript Backtrace would be super helpful. And to be clear, the GDScript backtrace would be logged separately from this Apple crash report.
Part of my release CI uploads dsyms to Apple which then allows Apple to desymbolicate crash reports for me locally. |
This is being tracked in #105. |
Describe the project you are working on
I'm working on a mobile game using the Godot Engine. The game targets iOS and Android. Crash handling is critical for debugging and overall stability. The game is a menu-based RPG with multiplayer elements.
https://x.com/HeroicLegendsRB
Describe the problem or limitation you are having in your project
Currently, my app is crashing on launch in release builds only. To debug this issue, I need a way to view the backtrace of the crashing thread.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The proposed feature is a crash handler for iOS. The handler would work like the existing macOS crash handler:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
crash_handler_macos.h/mm to crash_handler_iOS.h/mm
crash_handler_iOS
to platform/ios/SCsubos_ios.mm
disable_crash_handler
/is_disable_crash_handler
NOTIFICATION_CRASH
to include iOS.Testing:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Crash logging can be disabled with arg
--disable-crash-handler
.Is there a reason why this should be core and not an add-on in the asset library?
The text was updated successfully, but these errors were encountered: