haozuguo / ebookdroid

Automatically exported from code.google.com/p/ebookdroid
0 stars 0 forks source link

Infinite "Decoder is restarting" message on opening book #913

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?

1. Download [this](http://ge.tt/5hUlF2A2/v/0?c) book.
2. Open it using EBookDroid.

> What is the expected output?

The book opens and displays as so:
![img](http://s25.postimg.org/om4188re7/screenshot_1423313540.jpg)

> What do you see instead?

Blank pages: the same number (426 pages), but all blank; and a recurrent toast 
message that sticks to the bottom of the screen and says "Decoder restarting..."

> What version of the product are you using?

v2.2.1 (According to Android's App Info)

> On what operating system?

Android v5.0.2 Lollipop.

> What device are you using?

Nexus 7 2013 Edition.

> Please provide any additional information below.

The issue holds only for this book. No other book has had this problem before. 
I have not tested this book on any other version of the app.

Original issue reported on code.google.com by mindstor...@gmail.com on 7 Feb 2015 at 12:57

GoogleCodeExporter commented 9 years ago
Note that the book opens perfectly on the Drive PDF Viewer provided on my 
Android device, as well as on PC (PDF-XViewer).

Original comment by mindstor...@gmail.com on 7 Feb 2015 at 12:58

GoogleCodeExporter commented 9 years ago
Pls try to the new RC candidate:
https://drive.google.com/open?id=0B6DTNNagrvFPeUxDSlVxUmtBdGs&authuser=0

Original comment by Alexander.V.Kasatkin@gmail.com on 7 Feb 2015 at 1:09

GoogleCodeExporter commented 9 years ago
Okay, so I just downloaded the new version and ran it, but with the same 
results.

If you want a screenshot, here it is:

![img](http://s25.postimg.org/bj8eoz167/Screenshot_2015_02_07_18_41_31.jpg)

Note that the app is running on fullscreen.

Original comment by mindstor...@gmail.com on 7 Feb 2015 at 1:17

GoogleCodeExporter commented 9 years ago
Hi, I tried your book on Nexus 10 and Nexus 7 2013 edition and can not 
reproduce issue: book opens on both devices perfectly.

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 8:59

GoogleCodeExporter commented 9 years ago
Most interesting. Is there any data I can send to you which might be specific 
to my device?

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 9:00

GoogleCodeExporter commented 9 years ago
We need full system logcat output when decoder is restarting.

It can be achieved even on non-rooted device via adb from PC.

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 11:53

GoogleCodeExporter commented 9 years ago
Sure, I'll paste that in a short while.

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 12:27

GoogleCodeExporter commented 9 years ago
Here is the log while opening the book:

http://pastebin.mozilla.org/8636420

Also, if you want it filtered by "Error" status only, here it is:

http://pastebin.mozilla.org/8636456

Hope this helps you guys in pinpointing the error!

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 12:52

GoogleCodeExporter commented 9 years ago
From log I can see that there are some problem with loading built-in font:

02-09 18:11:34.476    4536-4536/? I/EBookDroid.MuPDF.Decoder? Built-in Document 
font: basefont=Helvetica 
file=/storage/emulated/0/.org.ebookdroid/fonts/NimbusL/NimbusSanL-Regu.20131216.
cff
02-09 18:11:34.480    4536-4536/? E/MuPDF? error: freetype: cannot load font: 
cannot open resource
02-09 18:11:34.480    4536-4536/? E/MuPDF? error: cannot load cid font (1319 0 
R)
02-09 18:11:34.480    4536-4536/? E/MuPDF? uncaught exception: cannot load cid 
font (1319 0 R) 

Try to delete /storage/emulated/0/.org.ebookdroid/fonts/NimbusL/ folder. 
EBookDroid should unpack needed fonts from scratch on next start.

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 1:10

GoogleCodeExporter commented 9 years ago
I'm sorry, that doesn't fix the issue. Here's the log after following the above 
steps (It looks pretty much the same, but might be useful).

http://pastebin.mozilla.org/8637071

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 1:28

GoogleCodeExporter commented 9 years ago
Can you check that file 
/storage/emulated/0/.org.ebookdroid/fonts/NimbusL/NimbusSanL-Regu.20131216.cff 
actually exists?

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 1:40

GoogleCodeExporter commented 9 years ago
Yes it does. Here's the screenshot of all the files in that folder, for good 
measure.

http://i.imgur.com/ohJCSd1h.png

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 1:45

GoogleCodeExporter commented 9 years ago
Is this issue happens with this document only or with any other pdf file?

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 1:48

GoogleCodeExporter commented 9 years ago
This document alone. No other pdf has had this error yet, on this or on 
previous versions of the app, and I've been using EBookDroid for over an year.

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 1:49

GoogleCodeExporter commented 9 years ago
Your document missing SimSun font. It is soma asian font and should be replaced 
by android's system fallback font.

Can you please show listing of /system/fonts/ folder? It seems that there are 
some problem with loading fallback font for asian languages.

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 1:55

GoogleCodeExporter commented 9 years ago
Here's the listing (from a quick os.listdir() in python):

http://pastebin.mozilla.org/8637571

You're right, I don't think I see SimSun anywhere in that list. What are my 
corrective measures?

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 2:07

GoogleCodeExporter commented 9 years ago
OK. I do reproduce your issue by removing /system/fonts/DroidSansFallback.ttf 
on my device.

You can workaround your issue now by downloading SimSun font 
(http://ge.tt/5F8To9A2/v/0) and putting it to /sdcard/fonts/

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 2:08

GoogleCodeExporter commented 9 years ago
Dude. You are the bomb. Thanks a lot... works perfectly. You can close this 
issue now, I guess.

Normally for PDFs, a pop-up comes up when the requisite font is not present (I 
keep getting this one to put in Helvetica) but the book still loads. I'm not 
sure if this issue would fall under that category, but the app should possibly 
display the fact that the book cannot be loaded because "The following fonts: 
SimSun is missing. Please download it and place it in '/sdcard/fonts'" or 
something like that. Instead this book caused blank pages and a "Decoder is 
restarting..." message. Is there any way to test for this and gracefully 
display an error message or something? (There, look I gave you another issue :P 
)

Original comment by mindstor...@gmail.com on 9 Feb 2015 at 2:19

GoogleCodeExporter commented 9 years ago
You are right. And our app do show such message! 

Your file is exception: missed font SimSun is an asian font we assumed, that 
android always has some substitution for that: 
/system/fonts/DroidSansFallback.ttf, but your device missed it for some reason. 
I already implemented a fix so app wont'n be crash or constant restart decoder.

Original comment by Andrei.K...@gmail.com on 9 Feb 2015 at 2:36

GoogleCodeExporter commented 9 years ago
Fixed in 2.2.2 - at least font missing dialog is shown.

Original comment by Alexander.V.Kasatkin@gmail.com on 11 Feb 2015 at 7:56