Skip to content

Reporting silent errors in release builds #551

@m-radzikowski

Description

@m-radzikowski

From what I've tested, runtime errors that are silently handled by Godot, like array out of bounds, are not visible in release builds and not reported by Sentry. Is this correct and is there any way to enable it?

Details

Godot silently "ignores" most errors in debug and release builds. For example this code:

var arr := []
print("oob ", arr[0])

will print oob <null> (unlike when running from the editor).

In debug builds, those are logged to file, and also intercepted and reported to Sentry.
In release builds however, there is no error log nor Sentry event.

This kinda undermines the idea of reporting problems, if only errors reported are those sent manually from the code, with either SentrySDK.capture_message() or push_error(), and crashes to desktop.

And this is the exact scenario as in Sentry video: https://www.youtube.com/watch?v=l2u1NQNWksQ (call("nonexisting_method") also is not reported in release build).

As far as I can say, the Logger _log_error is simply not invoked with such error in release builds.

So:

  • Am I doing something wrong? I've tested on fresh project, Godot 4.6.1, Windows
  • Is the only solution for proper reporting to use debug builds? Which is far from optimal for production.
  • Or is this possible with custom template, similarly to stack traces?

If this is Engine limitation, I will open issue/proposal there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugsomething isn't working as it shouldErrorsissues relates to the error reporting productGodotplatform label
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions