View Single Post
Old 03-29-2017, 03:08 PM   #1
StuartJ
Member
StuartJ doesn't litterStuartJ doesn't litterStuartJ doesn't litter
 
Posts: 21
Karma: 242
Join Date: Nov 2015
Device: Likebook Mimas, Kobo Aura One, LG V20
[Android] CC 5.2.4.4: "problem writing to device storage" (*not* a space issue)

I've been a very happy user of Calibre Companion for the last couple of years, but I've finally hit an error transferring files from Calibre which I can't seem to resolve. Please help!

I have a fairly large library (about 1500 books, 6.5Gb storage on an external SD card) that Calibre Companion was managing fine.. until my phone died and I didn't have a (recent) backup of the Calibre Companion database. Since there's no way (as far as I know) to reinitialise Calibre Companion just from the storage directory, when I got a new phone (Samsung Galaxy S5 mini, running Lineage OS 13) I deleted the storage directory and started the process of retransferring the books over a wifi connection.

Everything started out fine, but after a hundred or so books, I got an error message "Device out of space? There was a problem writing to device storage". However, I still have 23Gb free space showing on the SD card. I thought there might be some problem with the amount of files being transferred in one go, so I rebooted and tried again with a smaller number of files. This seemed to work better, but I was still hitting the same problem again with increasing frequency. Now, I've more or less got the stage of trying to transfer one book and hit the error.

I'll email the full debug log, but below is what seems to be the relevant snippet from the most recent occurrence:

Spoiler:

2017-03-29 16:18:21.129: current lpath=Scam School Book 1_ Smoke - Brian Brushwood (1218).epub
2017-03-29 16:18:21.131: checkLpathComponents started B/Brian Brushwood/Scam School Book 1_ Smoke - Brian Brushwood w/URI=true
2017-03-29 16:18:21.508: checkLpathComponents finished B/Brian Brushwood/Scam School Book 1_ Smoke - Brian Brushwood
2017-03-29 16:18:21.509: new lpath=B/Brian Brushwood/Scam School Book 1_ Smoke - Brian Brushwood.epub
2017-03-29 16:18:21.510: Not deleting format. lpath equivalence: lpath=B/Brian Brushwood/Scam School Book 1_ Smoke - Brian Brushwood.epub, #books found=0, prikey=-1
2017-03-29 16:18:21.512: Command SendBook: receiving sequence 0 of 1, title=Scam School Book 1: Smoke lpath=B/Brian Brushwood/Scam School Book 1_ Smoke - Brian Brushwood.epub
2017-03-29 16:18:29.427: IOException writing a book
java.io.IOException: write failed: EIO (I/O error)
at libcore.io.IoBridge.write(IoBridge.java:498)
at java.io.FileOutputStream.write(FileOutputStream.ja va:186)
at com.multipie.cclibrary.LocalData.a.h.a(Source:319)
at com.multipie.cclibrary.a.a.p.a(Source:109)
at com.multipie.cclibrary.a.a.b(Source:263)
at com.multipie.cclibrary.a.a.a(Source:218)
at com.multipie.cclibrary.a.a.run(Source:241)
Caused by: android.system.ErrnoException: write failed: EIO (I/O error)
at libcore.io.Posix.writeBytes(Native Method)
at libcore.io.Posix.write(Posix.java:271)
at libcore.io.BlockGuardOs.write(BlockGuardOs.java:31 3)
at libcore.io.IoBridge.write(IoBridge.java:493)
... 6 more
2017-03-29 16:18:29.455: Log flush
2017-03-29 16:18:29.477: Unexpected error reading RPC
java.lang.NumberFormatException: Invalid int: "������g�xD���tҥ`�G�J��P��w����u�6d<ڡ^Ҧ"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:410)
at java.lang.Integer.parseInt(Integer.java:367)
at java.lang.Integer.parseInt(Integer.java:334)
at com.multipie.cclibrary.a.f.c(Source:63)
at com.multipie.cclibrary.a.a.a(Source:209)
at com.multipie.cclibrary.a.a.run(Source:241)


In this case (and others previously) part of the file has been written to the filesystem: for example, there is a 1.5Mb file on the SD card whereas the original in Calibre was 6.5Mb. Until I delete this file, Calibre Companion will no longer sync properly to Calibre.

I thought the problem might also somehow be content related - with some issue triggered by the files themselves - but I have sometimes been able to retransfer the file where the error occured, e.g. earlier when I thought the problem related to the 'batch size' of number of files being transferred.

Please let me know if there's any other information that would useful in helping debug this. I'm also happy to test locally if you have any suggestions or further diagnostic tests to try. Any help to resolve this much appreciated!
StuartJ is offline   Reply With Quote