helloworld1 / AnyMemo

Advanced Spaced Repetition flashcard learning software for Android.
http://www.anymemo.org
GNU General Public License v2.0
151 stars 53 forks source link

Exception: android.view.WindowLeaked #482

Open WangGuox1n opened 5 years ago

WangGuox1n commented 5 years ago

Hi, I'm using version 10.11.3, when testing the app, there is a exception:

STACK_TRACE= E/WindowManager( 2463): android.view.WindowLeaked: Activity org.liberty.android.fantastischmemo.ui.CardEditor has leaked window android.widget.LinearLayout{52acca68 V.E..... ......I. 0,0-264,96} that was originally added here E/WindowManager( 2463): at android.view.ViewRootImpl.(ViewRootImpl.java:346) E/WindowManager( 2463): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248) E/WindowManager( 2463): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) E/WindowManager( 2463): at androidx.appcompat.widget.TooltipPopup.show(TooltipPopup.java:86) E/WindowManager( 2463): at androidx.appcompat.widget.TooltipCompatHandler.show(TooltipCompatHandler.java:174) E/WindowManager( 2463): at androidx.appcompat.widget.TooltipCompatHandler.onLongClick(TooltipCompatHandler.java:123) E/WindowManager( 2463): at android.view.View.performLongClick(View.java:4474) E/WindowManager( 2463): at android.view.View$CheckForLongPress.run(View.java:18401) E/WindowManager( 2463): at android.os.Handler.handleCallback(Handler.java:733) E/WindowManager( 2463): at android.os.Handler.dispatchMessage(Handler.java:95) E/WindowManager( 2463): at android.os.Looper.loop(Looper.java:136) E/WindowManager( 2463): at android.app.ActivityThread.main(ActivityThread.java:5001) E/WindowManager( 2463): at java.lang.reflect.Method.invokeNative(Native Method) E/WindowManager( 2463): at java.lang.reflect.Method.invoke(Method.java:515) E/WindowManager( 2463): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) E/WindowManager( 2463): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) E/WindowManager( 2463): at dalvik.system.NativeStart.main(Native Method)

wondering is this a bug of Anymemo?

WangGuox1n commented 5 years ago

another exception: STACK_TRACE= E/AndroidRuntime(11654): FATAL EXCEPTION: IntentService[org.liberty.android.fantastischmemo.service.ConvertIntentService] E/AndroidRuntime(11654): Process: org.liberty.android.fantastischmemo, PID: 11654 E/AndroidRuntime(11654): java.lang.IllegalArgumentException: The Action is wrong E/AndroidRuntime(11654): at org.liberty.android.fantastischmemo.service.ConvertIntentService.onHandleIntent(ConvertIntentService.java:80) E/AndroidRuntime(11654): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) E/AndroidRuntime(11654): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(11654): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime(11654): at android.os.HandlerThread.run(HandlerThread.java:61)

helloworld1 commented 5 years ago

Thanks for reporting the bug. The first issue is actually known. I don't have a simple way to actually fix it. For the second issue, how did you trigger this error?

anlalalu commented 4 years ago

Several issues similar to the first one here are listed in #486 and #487 .

The second issue can be triggered with command line instruction: adb shell am startservice org.liberty.android.fantastischmemo/org.liberty.android.fantastischmemo.service.ConvertIntentService This can not be triggered by user events easily but may be a case that should be handled.

Do you consider these as defects? @helloworld1