-
Notifications
You must be signed in to change notification settings - Fork 795
Description
The crash happens on the ice-cream-sandwich branch.
When the Android device or emulator is in a non-ISO 8859-1 language, and is instead in say a ISO 8859-2 language such as Hungarian or Czech, and you are reading an epub with a cover image in one of those non-ISO 8859-1 languages, such as Hungarian or Czech, the program crashes. It crashes, because when the code is dealing with the JPG cover image embedded within the epub, it does a check to see if character encoding is windows-1252. The check assumes the character encoding is ISO 8859-1 before the check even completes, and crashes if it is not so. I will post about that in subsequent comments.
This is on the ice-cream-sandwich branch, in a Jellybean (4.1) emulator in Czech language mode. I downloaded one of the epub books the app can not handle - R.U.R. by Karel Čapek. You can download that epub here ( http://www.gutenberg.org/ebooks/13083.epub ).
Czech epub's without a JPEG cover image loaded fine. Ones like this with a JPEG cover image crashed during the load though.
Also, Hungarian epub's with JPEG cover images crash the app in similar circumstances. The emulator set to Hungarian language, the epub loaded being a Hungarian language (Magyar) book with a JPG cover image in the epub. It will crash as well.
Here is the crash method as I try to load the book up. The crash is repeatable, I've done it several times:
W/System.err( 588): using plugin: ePub/NATIVE
W/dalvikvm( 588): JNI WARNING: input is not valid Modified UTF-8: illegal start byte 0xff
W/dalvikvm( 588): string: 'ÿØÿà'
W/dalvikvm( 588): in Lorg/geometerplus/fbreader/formats/NativeFormatPlugin;.readModelNative:(Lorg/geometerplus/fbreader/bookmodel/BookModel;)Z (NewStringUTF)
I/dalvikvm( 588): "Thread-80" prio=5 tid=11 NATIVE
I/dalvikvm( 588): | group="main" sCount=0 dsCount=0 obj=0x41565ff0 self=0x2a314ad8
I/dalvikvm( 588): | sysTid=664 nice=0 sched=0/0 cgrp=apps handle=707939960
I/dalvikvm( 588): | schedstat=( 288679729 2049960715 86 ) utm=24 stm=4 core=0
I/dalvikvm( 588): #00 pc 00001260 /system/lib/libcorkscrew.so (unwind_backtrace_thread+27)
I/dalvikvm( 588): #1 pc 0005f664 /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+35)
I/dalvikvm( 588): #2 pc 00053518 /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const_, Thread_, bool)+303)
I/dalvikvm( 588): #3 pc 000535b2 /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
I/dalvikvm( 588): #4 pc 00038cfa /system/lib/libdvm.so
I/dalvikvm( 588): #5 pc 0003a0ac /system/lib/libdvm.so
I/dalvikvm( 588): #6 pc 0003c30a /system/lib/libdvm.so
I/dalvikvm( 588): #7 pc 000377d8 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (AndroidUtil::createJavaString(_JNIEnv*, std::string const&)+15)
I/dalvikvm( 588): #8 pc 00046b50 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLUnicodeUtil::toLower(std::string const&)+35)
I/dalvikvm( 588): #9 pc 00047ea8 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLXMLReader::readDocument(shared_ptr)+195)
I/dalvikvm( 588): #10 pc 00047f9c /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLXMLReader::readDocument(ZLFile const&)+15)
I/dalvikvm( 588): #11 pc 0005e658 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (XHTMLImageFinder::readImage(ZLFile const&)+87)
I/dalvikvm( 588): #12 pc 0005baba /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (OEBBookReader::startElementHandler(char const_, char const_*)+1777)
I/dalvikvm( 588): #13 pc 00048f72 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLXMLReaderInternal::fStartElementHandler(void_, char const_, char const**)+309)
I/dalvikvm( 588): #14 pc 00079402 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so
I/dalvikvm( 588): #15 pc 00079b64 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so
I/dalvikvm( 588): #16 pc 000788e6 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so
I/dalvikvm( 588): #17 pc 00078e12 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so
I/dalvikvm( 588): #18 pc 0007aaf2 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (XML_ParseBuffer+57)
I/dalvikvm( 588): #19 pc 00048012 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLXMLReaderInternal::parseBuffer(char const*, unsigned int)+5)
I/dalvikvm( 588): #20 pc 00047f14 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLXMLReader::readDocument(shared_ptr)+303)
I/dalvikvm( 588): #21 pc 00047f9c /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (ZLXMLReader::readDocument(ZLFile const&)+15)
I/dalvikvm( 588): #22 pc 0005ae8a /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (OEBBookReader::readBook(ZLFile const&)+189)
I/dalvikvm( 588): #23 pc 0005dd86 /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (OEBPlugin::readModel(BookModel&) const+57)
I/dalvikvm( 588): #24 pc 00036f4a /data/data/org.geometerplus.zlibrary.ui.android/lib/libNativeFormats-v2.so (Java_org_geometerplus_fbreader_formats_NativeFormatPlugin_readModelNative+149)
I/dalvikvm( 588): #25 pc 0001de30 /system/lib/libdvm.so (dvmPlatformInvoke+112)
I/dalvikvm( 588): #26 pc 0004ce66 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const_, JValue_, Method const_, Thread_)+389)
I/dalvikvm( 588): #27 pc 00038d84 /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const_, JValue_, Method const_, Thread_)+7)
I/dalvikvm( 588): #28 pc 00027260 /system/lib/libdvm.so
I/dalvikvm( 588): #29 pc 0002bb2c /system/lib/libdvm.so (dvmInterpret(Thread_, Method const_, JValue*)+180)
I/dalvikvm( 588): #30 pc 0005f590 /system/lib/libdvm.so (dvmCallMethodV(Thread_, Method const_, Object_, bool, JValue_, std::__va_list)+271)
I/dalvikvm( 588): #31 pc 0005f5ba /system/lib/libdvm.so (dvmCallMethod(Thread_, Method const_, Object_, JValue_, ...)+19)
I/dalvikvm( 588): at org.geometerplus.fbreader.formats.NativeFormatPlugin.readModelNative(Native Method)
I/dalvikvm( 588): at org.geometerplus.fbreader.formats.NativeFormatPlugin.readModel(NativeFormatPlugin.java:63)
I/dalvikvm( 588): at org.geometerplus.fbreader.formats.oeb.OEBNativePlugin.readModel(OEBNativePlugin.java:47)
I/dalvikvm( 588): at org.geometerplus.fbreader.bookmodel.BookModel.createModel(BookModel.java:47)
I/dalvikvm( 588): at org.geometerplus.fbreader.fbreader.FBReaderApp.openBookInternal(FBReaderApp.java:259)
I/dalvikvm( 588): at org.geometerplus.fbreader.fbreader.FBReaderApp$1.run(FBReaderApp.java:157)
I/dalvikvm( 588): at org.geometerplus.android.util.UIUtil$3$1.run(UIUtil.java:120)
I/dalvikvm( 588):
E/dalvikvm( 588): VM aborting
F/libc ( 588): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 664 (Thread-80)
I/DEBUG ( 34): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 34): Build fingerprint: 'generic/sdk/generic:4.1/JRN83C/391408:eng/test-keys'
I/DEBUG ( 34): pid: 588, tid: 664, name: UNKNOWN >>> org.geometerplus.zlibrary.ui.android <<<
I/DEBUG ( 34): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d