一些用户随机跟踪崩溃,很难重现和调试。
这是Xamarin表单项目,我从可移植项目编写了android项目的界面,以调用和关闭对话框。
下面是堆栈跟踪:
Java.Lang.RuntimeException: View=DecorView@436ca9e[MainActivity] not attached
to window manager
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c]
in <793d884878e04897966a5f2be50d2777>:0
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod
(Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method,
Java.Interop.JniArgumentValue* args) [0x00069] in
<acbdf8c357bc4305803000756be43728>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod
(System.String encodedMember, Java.Interop.IJavaPeerable self,
Java.Interop.JniArgumentValue* parameters) [0x0002a] in
<acbdf8c357bc4305803000756be43728>:0
at Android.App.Dialog.Cancel () [0x0000a] in
--- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.IllegalArgumentException: View=DecorView@436ca9e[MainActivity] not
attached to window manager
at
android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:479)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:388)
at
android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:128)
at android.app.Dialog.dismissDialog(Dialog.java:610)
at android.app.Dialog.dismiss(Dialog.java:593)
at android.app.Dialog.cancel(Dialog.java:1508)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
如何识别此崩溃?