sethumadhavan / apv

Automatically exported from code.google.com/p/apv
GNU General Public License v3.0
0 stars 0 forks source link

Specific PDF crashes viewer #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Opening the attached PDF causes a force close in version 0.2.7.

The Log Collector gives the following:

05-19 11:29:20.276 E/AndroidRuntime(12684): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{cx.hell.android.pdfview/cx.hell.android.pdfview.OpenFileActi
vity}: java.lang.RuntimeException: failed to load pdf file
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2492)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2508)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.ActivityThread.access$2200(ActivityThread.java:118)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1862)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.os.Looper.loop(Looper.java:123)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.ActivityThread.main(ActivityThread.java:4358)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java
:791)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
dalvik.system.NativeStart.main(Native Method)
05-19 11:29:20.276 E/AndroidRuntime(12684): Caused by:
java.lang.RuntimeException: failed to load pdf file
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
cx.hell.android.pdfview.PDFPagesProvider.getPageCount(PDFPagesProvider.jav
a:366)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
cx.hell.android.pdfview.PDFPagesProvider.getPageSizes(PDFPagesProvider.jav
a:376)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
cx.hell.android.lib.pagesview.PagesView.setPagesProvider(PagesView.java:27
6)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
cx.hell.android.pdfview.OpenFileActivity.onCreate(OpenFileActivity.java:10
1)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123
)
05-19 11:29:20.276 E/AndroidRuntime(12684):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2455)
05-19 11:29:20.276 E/AndroidRuntime(12684):     ... 11 more

"The attached PDF is broken" would of course be a valid response, but my
PC viewers have so much as shown a diagnostic message.

Original issue reported on code.google.com by thomasra...@gmail.com on 19 May 2010 at 12:39

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by mpietrzak on 19 May 2010 at 1:33

GoogleCodeExporter commented 8 years ago
I can't confirm it :)

I've displayed it with current version. It shows ugly white border around pages 
- but 
that's because APV shows media box instead of content only.

Could you please provide more information? Like phone model, resolution, 
android 
system version. Maybe you could provide more logs (before exception you've 
pasted 
happens).

Did you try to reproduce this bug in emulator?

Original comment by mpietrzak on 19 May 2010 at 1:42

GoogleCodeExporter commented 8 years ago
Wow, thanks for an extremely fast response time.

I use the latest stable cyanogen ROM on a plain old G1. I've attached the log; 
some
relevant information that is also at its top:

Log Collector version: 1.1.0
 Device model: T-Mobile G1
 Firmware version: 1.6
 Kernel version: 2.6.29.6-cyanogenmod
root@pershoot-ubuntu )
#1 PREEMPT Wed Mar 3 23:43:23 EST 2010
 Build number: DRC83

The log is from a run with the "dusted donuts" dalvik JIT enabled, as you can 
also
see from some messages. However I've also tested with the original dalvik, with 
the
same result.

I'll have to put off experiments with the emulator until after working hours.

Original comment by thomasra...@gmail.com on 19 May 2010 at 2:30

Attachments:

GoogleCodeExporter commented 8 years ago
Very strange - I'm using adp1 with htc's android 1.6 and get rendering.

Are you sure pdf file on your sdcard is not broken?

Would you be willing to test with specially built apk with additional debugging 
enabled? Debug version produces a LOT of logs and works very slowly, but it's 
possible 
to pin down bugs

Original comment by mpietrzak on 19 May 2010 at 2:40

GoogleCodeExporter commented 8 years ago
Damn, you're right. The PDF came out of K-9 mail damaged (saved it from an 
email).
Getting a fresh copy worked. Sorry for taking your time over this.

I suppose a "your PDF is damaged" error message would have been nice though ;-)

Original comment by thomasra...@gmail.com on 19 May 2010 at 2:49

GoogleCodeExporter commented 8 years ago
PDF Viewer should never crash. I didn't bother with proper error reporting in 
early 
stages of coding, but now it's definitely the time to fix those loose ends, so 
I'm 
leaving this open; it should be fixed in 0.2.8.

Original comment by mpietrzak on 19 May 2010 at 3:08