Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Amazon Fire tablets]: ANR while clicking next/previous page button; or even browsing #5665

Closed
arooni opened this issue Dec 3, 2019 · 4 comments

Comments

@arooni
Copy link

arooni commented Dec 3, 2019

  • KOReader version: 2019.11
  • Device: kindle fire 10 tablet (2017); running latest fire os 5.6.4.0

Issue

Koreader seems to be pretty stable until I need to open a new book in my library. When I click open library sometimes koreader crashes. When that doesn't happen, click previous/next page enough time and koreader seems to crash

crash.log
I/InputDispatcher(  553): Application is not responding: Window{28647b41 u0 org.koreader.launcher/org.koreader.launcher.MainActivity}.  It has been 5006.7ms since event, 5006.0ms since wait started.  Reason: Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.  Wait queue length: 2.  Wait queue head age: 6333.0ms.
I/WindowManager(  553): Input event dispatching timed out sending to org.koreader.launcher/org.koreader.launcher.MainActivity.  Reason: Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.  Wait queue length: 2.  Wait queue head age: 6333.0ms.
W/ActivityManager(  553): Input dispatching paused for current ActivityRecord: ActivityRecord{2ea59299 u0 org.koreader.launcher/.MainActivity t4319}
I/Process (  553): Sending signal. PID: 3255 SIG: 3
...
E/ActivityManager(  553): ANR in org.koreader.launcher (org.koreader.launcher/.MainActivity)
E/ActivityManager(  553): PID: 3255
E/ActivityManager(  553): Reason: Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.  Wait queue length: 2.  Wait queue head age: 6333.0ms.)

seems like android OS is killing off koreader for some reason because it didn't respond fast enough to some query?

@pazos
Copy link
Member

pazos commented Dec 3, 2019

Same error you faced a few months ago in #5020.

It's a won't fix in my end, since I'm not able to reproduce anywhere.

There's another known ANR that can be reproduced anywhere: see #2113 (comment). But that is hard to fix as explained in #2113 (comment)

@pazos pazos changed the title [android] [fire 10 tablet; android 5] Clicking next / previous page button; or even library browse button crashes koreader [Amazon Fire tablets]: ANR while clicking next/previous page button; or even browsing Dec 3, 2019
@arooni
Copy link
Author

arooni commented Dec 4, 2019

Well I've reproduced the error several times on my kindle fire.

As it stands I'm not sure what I can do to continue using koreader on my tablet. I've gotten quite used to reading on it when I can't read my kindle paperwhite so that would be a bummer. The syncing is a killer feature. Maybe close all other apps first so that the OS reaper process doesn't attack koreader so aggressively? I know there is limited ram on the device as compared to higher end tablets.

I'm happy to test any solutions on the kindle fire which I think is a popular low end tablet that you might want to support.

It also seems like your bug in #2113 might be the root cause and I'd eagerly await any updates to t

At the end of the day I'm just a user and reporting the errors I see but I'm not doing the hard work of fixing it which is what you folks are doing.

@pazos
Copy link
Member

pazos commented Dec 4, 2019

Well I've reproduced the error several times on my kindle fire

That's my point. I'm not able to trigger an ANR (besides the known bug) in any of the devices I tested.

As it stands I'm not sure what I can do to continue using koreader on my tablet ... Maybe close all other apps first so that the OS reaper process doesn't attack koreader so aggressively? I know there is limited ram on the device as compared to higher end tablets.

ANR has nothing to do with RAM but with application not responding to input events. It can't be fixed or workarounded with the current design. If the program is busy doing something and a event stays in the queue for more than 5 seconds ActivityManager will trigger an ANR. Maybe the ActivityManager in Amazon Fire tablets is just less tolerant.

It also seems like your bug in #2113 might be the root cause and I'd eagerly await any updates to it

I will wait too. Hopefully somebody will figure out how to deal with it in the long run. But the known bug shouldn't hurt too much as there are a few situations where we can't drain the queue during that timeframe: reflowing big pdfs, downloading dictionaries...

I'm happy to test any solutions on the kindle fire which I think is a popular low end tablet that you might want to support.

Try another version? See if you can reproduce in all of them (in particular https://www.dropbox.com/s/ihhy8sei4vnb9ab/koreader-android-arm-linux-androideabi.apk?dl=0 that fixed your original report).

Nothing was touched on the android backend since then, except for the new logo, that could make things worse on that regaard.

At the end of the day I'm just a user and reporting the errors I see but I'm not doing the hard work of fixing it which is what you folks are doing.

Lets keep the issue open and see if other fire/KO users attempt to fix it. If is something fixable.

@pazos
Copy link
Member

pazos commented Feb 7, 2020

Closing this as inactive. PR are welcome.

@pazos pazos closed this as completed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants