Problems using the compiled library

31 views
Skip to first unread message

Mamadou

unread,
Apr 13, 2011, 2:18:51 PM4/13/11
to DroidReader Developer List
Hi,
First thank you for your hard work. I have been desperately looking
for a way to use the mupdf library on android 1.6. Your pdfrender lib
is really saving my life.
However, when I try to open a pdf using the DroidReaderView, it exits
without any notification. I got the same behavior from the DroidReader
apk i built from the source code. I have checkout the lastest version
of the dependencies and had to make some changes in the "mupdf-overlay/
base_memory.c" file in order to compile :
- added missing function "fz_calloc"
- missing parameter "int size" in "fz_realloc"
Have I done something wrong (in this case what are the correct
versions of the dependencies) or did I miss something ?

Rob Brown

unread,
Apr 13, 2011, 6:06:45 PM4/13/11
to DroidReader Developer List
I've build that code many times without problems, so I suspect that
maybe your build environment is wrong. Then again, I haven't built it
with a new version of the SDK/NDK so perhaps Google has changed
something.

Can you please let us know what version of the SDK and NDK you're
using, and exactly the steps you're taking to build the code? It'll
probably be simplest to get the .apk working first.

Regards,
Rob.

Mamadou Diallo

unread,
Apr 13, 2011, 9:37:11 PM4/13/11
to droidreader-d...@googlegroups.com
I'm using sdk r10 and ndk 5b on ubuntu 10.10 32 bits. For the external dependencies, i retrieved the lastest source code.

I had few problems with the "mupdf-overlay/base_memory.c" :
- The definition of "void *fz_realloc(void *p, int n)" changed to "void *fz_realloc(void *p, int count, int size)". I corrected it by adding the new parameter.
- There is a fz_calloc function needed by "mupdf/pdf_parse.c" and "pdf_xref.c", corrected by coying the implementation from the initial base_memory.c file.

After that the compilation process went smoothly. But still, both the DroidReader apk and my application exit when trying to open a pdf document.

Rob Brown

unread,
Apr 13, 2011, 10:06:35 PM4/13/11
to DroidReader Developer List
OK, thanks for the report. I'll give it a go soon.

In the meantime, did you have a look at the android log (adb logcat),
and if so, were there any clues in there?

Mamadou Diallo

unread,
Apr 14, 2011, 4:50:43 AM4/14/11
to droidreader-d...@googlegroups.com
Hi,
I found the problem. It was due to some bug in the mupdf library in "pdf_cmap.c". I will notify them.

Mamadou Diallo

unread,
Apr 14, 2011, 5:04:07 AM4/14/11
to droidreader-d...@googlegroups.com
Looks like they found it too. It's now corrected and everything is working fine now. Thank you for your support.


Le mercredi 13 avril 2011 à 19:06 -0700, Rob Brown a écrit :
Reply all
Reply to author
Forward
0 new messages