Skip to content

Crash when re-initializing the sentry subsystem #592

@diekleinekuh

Description

@diekleinekuh

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which version of the SDK?
Git-URL, 18.0 git hub release for unreal 5.3

Which version of Unreal?
Unreal 5.3.2

Is this happening in Unreal (editor) or on a player like Android, iOS, Windows?
We only use sentry for the windows game target for now.

Steps to Reproduce

  1. Initialize the sentry subsystem with a call to InitWithSettings, Initialize or setting InitAutomatically in USentrySettings to true
  2. Initialize the sentry subsystem again later when having more data by calling InitWithSettings or Initialize again without calling Deinitialize first
  3. Wait for a log message to be printed by unreal

Expected Result

The app should not crash.

Actual Result

The app crashes

Any logs or screenshots

The reason for the crash is that when calling Initialize multiple times the FSentryOutputDevice instance in OutputDevice gets destroyed without deregistering them first from GLog (see USentrySubsystem::ConfigureOutputDevice() ).

Similar problems might be in USentrySubsystem::ConfigureOutputDeviceError() as the old FSentryOutputDeviceError device is still in GError when it is torn down while being used at the same time as the parent for the newly created device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    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