我得到一个泄露的窗口错误,但无法弄清楚原因。我认为它与我的绘图画布有关?我可能完全错了。我从现有活动开始一个新意图,当我点击后退按钮退出绘图活动并返回上一个活动时,应用程序崩溃了。以下是错误:
08-10 09:30:31.708: E/WindowManager(1286): Activity com.pocketbeta.mainscreenActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4131d998 that was originally added here
08-10 09:30:31.708: E/WindowManager(1286): android.view.WindowLeaked: Activity com.pocketbeta.mainscreenActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4131d998 that was originally added here
08-10 09:30:31.708: E/WindowManager(1286): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:344)
08-10 09:30:31.708: E/WindowManager(1286): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:267)
08-10 09:30:31.708: E/WindowManager(1286): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:215)
08-10 09:30:31.708: E/WindowManager(1286): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:140)
08-10 09:30:31.708: E/WindowManager(1286): at android.view.Window$LocalWindowManager.addView(Window.java:537)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.Dialog.show(Dialog.java:278)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.AlertDialog$Builder.show(AlertDialog.java:932)
08-10 09:30:31.708: E/WindowManager(1286): at com.pocketbeta.mainscreenActivity.onCreate(mainscreenActivity.java:78)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.Activity.performCreate(Activity.java:4465)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.ActivityThread.access$600(ActivityThread.java:123)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
08-10 09:30:31.708: E/WindowManager(1286): at android.os.Handler.dispatchMessage(Handler.java:99)
08-10 09:30:31.708: E/WindowManager(1286): at android.os.Looper.loop(Looper.java:137)
08-10 09:30:31.708: E/WindowManager(1286): at android.app.ActivityThread.main(ActivityThread.java:4424)
08-10 09:30:31.708: E/WindowManager(1286): at java.lang.reflect.Method.invokeNative(Native Method)
08-10 09:30:31.708: E/WindowManager(1286): at java.lang.reflect.Method.invoke(Method.java:511)
08-10 09:30:31.708: E/WindowManager(1286): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-10 09:30:31.708: E/WindowManager(1286): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-10 09:30:31.708: E/WindowManager(1286): at dalvik.system.NativeStart.main(Native Method)
08-10 09:30:31.708: W/KeyboardEx(635): loadKeyboard - non-fatal parsing problem
08-10 09:30:31.718: I/ActivityManager(212): START {cmp=com.pocketbeta/.drawings.DrawingActivity} from pid 1286
08-10 09:30:32.118: W/dalvikvm(1286): threadid=11: thread exiting with uncaught exception (group=0x40a4a1f8)
08-10 09:30:32.118: E/AndroidRuntime(1286): FATAL EXCEPTION: Thread-7539
08-10 09:30:32.118: E/AndroidRuntime(1286): java.lang.IllegalArgumentException
08-10 09:30:32.118: E/AndroidRuntime(1286): at android.view.Surface.unlockCanvasAndPost(Native Method)
08-10 09:30:32.118: E/AndroidRuntime(1286): at android.view.SurfaceView$4.unlockCanvasAndPost(SurfaceView.java:775)
08-10 09:30:32.118: E/AndroidRuntime(1286): at com.pocketbeta.drawings.DrawingSurface$DrawThread.run(DrawingSurface.java:86)