Skip to content

Intermittent fatal crash in GetDeviceNaturalOrientation on Android devices #2563

@dtaylorus

Description

@dtaylorus

When deployed to a large player base, the following intermittent fatal crash is reported for a non-trivial percentage of players:

Fatal Exception: android.runtime.JavaProxyThrowable: [System.InvalidOperationException]: NaturalOrientation detection failed. Set ScreenOrientation in MainActivity to FullSensor.
       at Microsoft.Xna.Framework.AndroidCompatibility.GetDeviceNaturalOrientation
       at Microsoft.Xna.Framework.AndroidCompatibility..ctor
       at Microsoft.Xna.Framework.AndroidCompatibility.Initialize
       at Microsoft.Xna.Framework.AndroidGameActivity.OnCreate

MainActivity ScreenOrientation is in fact set to FullSensor and in unit testing works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions