hm, OK. That's probably something along the lines of out-of-memory...
Can you check with a very basic PDF (not having large images) if it
works in principle? E.g. in the latest SVN source, there's the
test-cases subfolder with some PDFs in it.
The code in question was provided by Rob, I will have to trace what it
does exactly. But it's probably a safety net that will terminate early
on documents that would consume too much memory anyway. Given the
resource restriction on typical Android devices, you will likely
encounter documents that just won't work well on these devices.
Since I think Rob might have a comment, I forward this reply to the
DroidReader mailing list. The whole discussion should have happened
there anyway, I think.
-hwh
2011/4/28 Eric Dong <dong...@gmail.com>:
> Hi,
> Thank for your help. I've installed a file manager(ES File Manager) in my
> phone, and selected a pdf file from sdcard,
> then I selected the Droidreader to open it, but the Droidreader breakdown
> while open the file. Thank you!
> The following is the error message:
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): FATAL EXCEPTION: main
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390):
> java.lang.UnsatisfiedLinkError: nativeIsMemoryHog
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.PdfDocument.nativeIsMemoryHog(Native Method)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.PdfDocument.isMemoryHog(PdfRender.java:241)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.DroidReaderDocument.open(DroidReaderDocument.java:168)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.DroidReaderActivity.openDocument(DroidReaderActivity.java:489)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.DroidReaderActivity.openDocumentWithLookup(DroidReaderActivity.java:478)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.DroidReaderActivity.openDocumentWithDecodeAndLookup(DroidReaderActivity.java:465)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> de.hilses.droidreader.DroidReaderActivity.onCreate(DroidReaderActivity.java:198)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.app.ActivityThread.access$1500(ActivityThread.java:117)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.os.Looper.loop(Looper.java:123)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> android.app.ActivityThread.main(ActivityThread.java:3683)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> java.lang.reflect.Method.invoke(Method.java:507)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> 04-28 03:07:54.789: ERROR/AndroidRuntime(390): at
> dalvik.system.NativeStart.main(Native Method)
>
> best wishes,
>
> -Eric
>
> 2011/4/27 Hans-Werner Hilse <hi...@web.de>
>>
>> Hi Eric,
>>
>> 2011/4/27 Eric Dong <dong...@gmail.com>:
>> > Hi,
>> > I am glad to write to you.Now there is question about the project of
>> > DroidReader http://droidreader.googlecode.com/svn
>> > when I click the "menu" and selected "Open PDF" then there is an error
>> > occurs, please see the attachment.
>>
>> Yep, Droidreader still needs a filemanager that implements the
>> openintent.org specified intents. You can use e.g. the OI Filemanager.
>> Another way to open a PDF is to use your file manager of choice and
>> select to open the PDF there.
>>
>> > Besides there is another question, I got
>> > the source from svn but there is no file in these directory
>> > "jni/freetype
>> > jni/jbig2dec jni/jpeg jni/mupdf jni/openjpeg", maybe you can help me.
>> > Thank
>> > you!
>>
>> those are intentionally empty. DroidReader depends on upstream code
>> from these projects. You have to download them seperately and copy the
>> files into the relevant directories. Please also see the README that
>> comes with the source code. It should mention the home pages of the
>> other projects.
>>
>> best wishes,
>>
>> -hwh
>
>