mvysny / aedict

Original Aedict 2 source codes
http://www.aedict.eu
GNU General Public License v3.0
40 stars 7 forks source link

Edict data corrupt after download #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Searching raised:

E/SearchTask( 1659): Task execution failed
E/SearchTask( 1659): sk.baka.aedict.util.IOExceptionWithCause: It seems
that the dictionary files became corrupted. Please try to delete them and
re-download them. Also please check your sd-card for errors.: read past EOF
E/SearchTask( 1659):    at
sk.baka.aedict.dict.LuceneSearch.search(LuceneSearch.java:170)
E/SearchTask( 1659):    at
sk.baka.aedict.dict.LuceneSearch.search(LuceneSearch.java:95)
E/SearchTask( 1659):    at
sk.baka.aedict.dict.LuceneSearch.singleSearch(LuceneSearch.java:200)
E/SearchTask( 1659):    at
sk.baka.aedict.ResultActivity$SearchTask.impl(ResultActivity.java:329)
E/SearchTask( 1659):    at
sk.baka.aedict.ResultActivity$SearchTask.impl(ResultActivity.java:314)
E/SearchTask( 1659):    at
sk.baka.autils.DialogAsyncTask.doInBackground(DialogAsyncTask.java:91)
E/SearchTask( 1659):    at android.os.AsyncTask$2.call(AsyncTask.java:185)
E/SearchTask( 1659):    at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
E/SearchTask( 1659):    at
java.util.concurrent.FutureTask.run(FutureTask.java:137)
E/SearchTask( 1659):    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
E/SearchTask( 1659):    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
E/SearchTask( 1659):    at java.lang.Thread.run(Thread.java:1096)
E/SearchTask( 1659): Caused by: java.io.IOException: read past EOF
E/SearchTask( 1659):    at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
E/SearchTask( 1659):    at
org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
E/SearchTask( 1659):    at
org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:81)
E/SearchTask( 1659):    at
org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:222)
E/SearchTask( 1659):    at
org.apache.lucene.index.SegmentReader.document(SegmentReader.java:879)
E/SearchTask( 1659):    at
org.apache.lucene.index.DirectoryReader.document(DirectoryReader.java:518)
E/SearchTask( 1659):    at
org.apache.lucene.index.IndexReader.document(IndexReader.java:658)
E/SearchTask( 1659):    at
org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:144)
E/SearchTask( 1659):    at
sk.baka.aedict.dict.LuceneSearch.searchInternal(LuceneSearch.java:131)
E/SearchTask( 1659):    at
sk.baka.aedict.dict.LuceneSearch.search(LuceneSearch.java:164)
E/SearchTask( 1659):    ... 11 more

If it's relevant, the first time it was downloading, I backgrounded the
app.  Redownloading it fixed it and it didn't repro again.

If the cause of this can't be found, it'd be a good idea to recover
gracefully: offer to delete and redownload the data instead of making the
user track down the right files to delete (and then probably have to
manually kill the app; it got a bit stuck after deleting its data).

G1 running CM 4.2.15.1.

Original issue reported on code.google.com by oldglenn...@gmail.com on 20 May 2010 at 8:29

GoogleCodeExporter commented 9 years ago
Hi, thanks for the bug report, I'll try it out.
Just a note - you can delete all dictionaries via a menu item in the Options.

Original comment by martin.v...@gmail.com on 20 May 2010 at 12:46

GoogleCodeExporter commented 9 years ago
Also see Issue 55

Original comment by martin.v...@gmail.com on 20 May 2010 at 12:51

GoogleCodeExporter commented 9 years ago
I failed to reproduce the bug on both 1.6 and 2.2 emulators, and on my CM 
5.0.7. The 
error message now mentions the ability to delete the files using the SDCard 
Cleanup 
Options item. With your permission I'd like to close the bug as CantReproduce.

Original comment by martin.v...@gmail.com on 23 May 2010 at 11:44

GoogleCodeExporter commented 9 years ago
If you want.  If it happens again, I'll make a copy of the corrupt files for
postmortem (but since it only happens during installation/dictionary upgrade, 
it's
not terribly likely).

Original comment by oldglenn...@gmail.com on 23 May 2010 at 7:33

GoogleCodeExporter commented 9 years ago
Nice, thanks.

Original comment by martin.v...@gmail.com on 23 May 2010 at 8:49

GoogleCodeExporter commented 9 years ago
Perhaps this is related to Issue 62

Original comment by martin.v...@gmail.com on 4 Jun 2010 at 5:16