bsprengelmeijer opened a new issue, #127:
URL: https://github.com/apache/cordova-plugin-screen-orientation/issues/127

   # Bug Report
   
   ## Problem
   
   App crashes when orientation is changed on startup.
   
   ### What is expected to happen?
   
   Orientation  locks to landscape.
   
   ### What does actually happen?
   
   App crashes.
   
   ## Information
   
   When I lock the orientation to landscape and fully close the application and 
restart it, it crashes.
   
   It does not happen when I add a timeout with a minimum of 3 seconds, so 
after the app is fully loaded. So changing the orientation when the app is 
loaded works fine, just not on startup.
   
   Waiting for the deviceready event doesn't make any difference only adding a 
minimum of 3 seconds delay.
   
   ### Command or Code
   
   `window.screen.orientation.lock('landscape');`
   
   ```
    FATAL EXCEPTION: mainandroid.content.res.Resources$NotFoundException: 
Resource ID #0x7f08007a
        at 
android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:235)
        at 
android.content.res.Resources.getDrawableForDensity(Resources.java:991)
        at android.content.res.Resources.getDrawable(Resources.java:931)
        at android.content.res.Resources.getDrawable(Resources.java:906)
        at 
org.apache.cordova.splashscreen.SplashScreen.onConfigurationChanged(SplashScreen.java:215)
        at 
org.apache.cordova.PluginManager.onConfigurationChanged(PluginManager.java:585)
        at 
org.apache.cordova.CordovaActivity.onConfigurationChanged(CordovaActivity.java:502)
        at 
android.app.ActivityThread.performActivityConfigurationChanged(ActivityThread.java:5932)
        at 
android.app.ActivityThread.performConfigurationChangedForActivity(ActivityThread.java:5858)
        at 
android.app.ActivityThread.handleActivityConfigurationChanged(ActivityThread.java:6142)
        at 
android.app.servertransaction.ActivityConfigurationChangeItem.execute(ActivityConfigurationChangeItem.java:53)
        at 
android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
        at 
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
        at 
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2304)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7930)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
   ```
   
   ### Environment, Platform, Device
   
   Android 13
   
   ### Version information
   
   Cordova android version 10
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to