I have recently started to get stability issues (crashes) reported when uploading my Xamarin app to the Google Play Console. Below is a sample stack trace:
Exception java.lang.IllegalArgumentException: View=DecorView@3961ac5[] not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked (WindowManagerGlobal.java:725)
at android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:611)
at android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:206)
at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:6156)
at android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2576)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8772)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
Unfortunately, I have not been able to reproduce this issue, nor has it ever turned up in my user crash logs. Can anyone suggest where I might start looking for the cause?