-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NullPointerException: Attempt to read from field 'java.util.List org.readium.r2_streamer.model.publication.EpubPublication.links' on a null object reference #221
Comments
@hrishikesh-kadam @mahavir155 I'm trying to get the book from my customer. Here is the xml part which has a problem: |
@OlegTarashkevich the xml contents are invalid, space is missing between ncx and PUBLIC keywords. After Horizontal scroll release we will look into how to handle all the invalid epubs gracefully. |
Thank you for the response! |
The proposed solution for this would be to use smarter libraries for xml parsing than inbuilt At the moment we are busy in Horizontal scroll feature. Till the time you can fix this error in the particular invalid book. This file would be toc.ncx and generally resides in OEBPS folder. |
Here is a link to the file toc.ncx: https://www.dropbox.com/s/pu7kj33jpj6rt77/toc.ncx?dl=0 |
@OlegTarashkevich Please upgrade FolioReader to v0.3.11 |
@hrishikesh-kadam @mahavir155 Thank you, it works! |
`06-18 05:48:08.241 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: EpubContainer Reading epub at path: /storage/emulated/0/Android/data/de.appcuisine.tigermedia.tigerbooks.alpha/files/1478407.epub
06-18 05:48:08.241 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: EpubContainer Reading file at path: mimetype
06-18 05:48:08.287 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: EpubContainer Reading file at path: META-INF/container.xml
06-18 05:48:08.289 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: EpubContainer Reading file at path: content.opf
06-18 05:48:08.290 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: OPFParser rootFile:= content.opf
06-18 05:48:08.290 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: EpubContainer Reading file at path: toc.ncx
06-18 05:48:08.294 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: org.xml.sax.SAXParseException: expected: '>' actual: '"' (position:DOCDECL ncxPUBLIC @1:59 in java.io.StringReader@9e52fce)
06-18 05:48:08.294 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
06-18 05:48:08.294 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.parser.EpubParser.xmlParser(EpubParser.java:129)
06-18 05:48:08.297 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.parser.NCXParser.parseNCXFile(NCXParser.java:37)
06-18 05:48:08.298 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.parser.OPFParser.parseSpineAndResourcesAndGuide(OPFParser.java:375)
06-18 05:48:08.298 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.parser.OPFParser.parseOpfFile(OPFParser.java:186)
06-18 05:48:08.298 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.parser.EpubParser.parseEpubFile(EpubParser.java:46)
06-18 05:48:08.298 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.server.EpubServer.parse(EpubServer.java:90)
06-18 05:48:08.299 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at org.readium.r2_streamer.server.EpubServer.addEpub(EpubServer.java:40)
06-18 05:48:08.299 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at com.folioreader.ui.folio.activity.FolioActivity.addEpub(FolioActivity.java:175)
06-18 05:48:08.300 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at com.folioreader.ui.folio.activity.FolioActivity.initBook(FolioActivity.java:163)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at com.folioreader.ui.folio.activity.FolioActivity.setupBook(FolioActivity.java:399)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at com.folioreader.ui.folio.activity.FolioActivity.onCreate(FolioActivity.java:134)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.Activity.performCreate(Activity.java:6664)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
06-18 05:48:08.301 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java)
06-18 05:48:08.302 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
06-18 05:48:08.302 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
06-18 05:48:08.303 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.os.Looper.loop(Looper.java:154)
06-18 05:48:08.303 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6077)
06-18 05:48:08.303 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at java.lang.reflect.Method.invoke(Native Method)
06-18 05:48:08.303 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
06-18 05:48:08.303 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
06-18 05:48:08.303 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha I/System.out: EpubParser parserEpubFile() error org.readium.r2_streamer.parser.EpubParserException: Error while parsing
06-18 05:48:08.305 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha D/AndroidRuntime: Shutting down VM
06-18 05:48:08.315 3435-3435/de.appcuisine.tigermedia.tigerbooks.alpha E/AndroidRuntime: FATAL EXCEPTION: main
Process: de.appcuisine.tigermedia.tigerbooks.alpha, PID: 3435
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2017.2.0f3
Device model : Genymotion Google Nexus 9 - 7.0.0 - API 24 - 1536x2048
Device fingerprint: Android/vbox86p/vbox86p:7.0/NRD90M/genymo09131924:userdebug/test-keys
06-18 05:48:08.326 646-1398/system_process W/ActivityManager: Force finishing activity de.appcuisine.tigermedia.tigerbooks.alpha/com.folioreader.ui.folio.activity.FolioActivity
06-18 05:48:08.345 646-1398/system_process W/ActivityManager: Force finishing activity de.appcuisine.tigermedia.tigerbooks.alpha/de.appcuisine.tigermedia.tigerbooks.ui.splash.SplashActivity
`
The text was updated successfully, but these errors were encountered: