dcostinett / and-bookworm

Automatically exported from code.google.com/p/and-bookworm
0 stars 0 forks source link

Some book scans causing force close #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
David MacLeod has reported this and been very helpful in providing info 
about it.  

Here is the last email from the log (bug happens only on DroidMod ROM with 
a Droid, as far as I know, on a stock Droid scanning works fine, I have one 
of those I use for testing).  

"#Created by Quick System Info version 1.3.6

Device: sholes
Model: Droid
Product: voles
Brand: verizon
Release: 2.0.1
Build: DroidMod 164 (1.0)
Locale: en_US

Linux version 2.6.29-compcache06_unionfs253-sholes-omap1-hg383b38baebcb-
dirty (trevorj@Fatty) (gcc version 4.3.1 (GCC) ) #106 PREEMPT Wed Feb 17 
07:33:36 UTC 2010

04-01 09:41:43.022 E/NetworkStateTracker(1274) :    
net.tcp.buffersize.evdo not found in system properties. Using defaults
04-01 09:56:51.960 E/WindowManager(1274) :  Unknown window type: 2008
04-01 09:57:03.100 E/WindowManager(1274) :  Unknown window type: 2008
04-01 09:57:15.905 E/AndroidRuntime(24580) :    Uncaught handler: thread 
AsyncTask #1 exiting due to uncaught exception
04-01 09:57:15.944 E/AndroidRuntime(24580) :    java.lang.RuntimeException: 
An error occured while executing doInBackground()
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
android.os.AsyncTask$3.done(AsyncTask.java:200)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.FutureTask.setException(FutureTask.java:124)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1
068)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
561)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.lang.Thread.run(Thread.java:1096)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    Caused by: 
java.lang.IndexOutOfBoundsException: Invalid location 0, size is 0
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.ArrayList.get(ArrayList.java:341)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
com.totsp.bookworm.data.GoogleBookDataSource.getSingleBook(GoogleBookDataSo
urce.java:61)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
com.totsp.bookworm.data.GoogleBookDataSource.getBook(GoogleBookDataSource.j
ava:39)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
com.totsp.bookworm.BookEntryResult$GetBookDataTask.doInBackground(BookEntry
Result.java:125)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
com.totsp.bookworm.BookEntryResult$GetBookDataTask.doInBackground(BookEntry
Result.java:1)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
android.os.AsyncTask$2.call(AsyncTask.java:185)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-01 09:57:15.944 E/AndroidRuntime(24580) :    ... 4 more
04-01 09:57:17.811 E/JavaBinder(1274) : !!! FAILED BINDER TRANSACTION !!!
04-01 09:57:23.061 E/WindowManager(1274) :  Unknown window type: 2008"

Original issue reported on code.google.com by charlie....@gmail.com on 1 Apr 2010 at 2:12

GoogleCodeExporter commented 9 years ago
I don't know why this would occur, it should only ever get to the 
"getSingleBook" call 
if it already has book data, but I will check into it. 

Original comment by charlie....@gmail.com on 1 Apr 2010 at 2:12

GoogleCodeExporter commented 9 years ago
Use has tried different books, same issue. Does not seem to be related to a 
particular 
title/ISBN. 

Original comment by charlie....@gmail.com on 1 Apr 2010 at 2:23

GoogleCodeExporter commented 9 years ago
please let me know if there is anything else I can do to help Charlie.

Dave M

Original comment by dmac...@gmail.com on 1 Apr 2010 at 3:36

GoogleCodeExporter commented 9 years ago
I added some logic so that the exception (and subsequent force close) should 
not 
happen, but I am still unsure why there would be no data at that point, so even 
though 
won't force close, probably still won't find the book (will show the "whoops 
that scan 
did not work" message).  

I am going to release a new version with this fix in it, and a few other 
tweaks, later 
today. 

Original comment by charlie....@gmail.com on 2 Apr 2010 at 4:23

GoogleCodeExporter commented 9 years ago

Original comment by charlie....@gmail.com on 2 Apr 2010 at 4:30

GoogleCodeExporter commented 9 years ago
Another user reported this too in the comments.  Need to get this ironed out. 

Original comment by charlie....@gmail.com on 2 Apr 2010 at 5:29

GoogleCodeExporter commented 9 years ago
Hi Charlie,
I installed the update but same issue, I did not get a chance yet to grab the 
logs
from it.
I did not uninstall then install the update, would that matter?
Dave M

Original comment by dmac...@gmail.com on 2 Apr 2010 at 8:13

GoogleCodeExporter commented 9 years ago
Nope, you shouldn't have to uninstall, just update should be fine.  If you get 
a 
chance please send the log. Looks like I still don't understand exactly 
where/why this 
is happening. 

One idea, what version of BarCode Scanner app do you have?  I don't know why it 
would 
matter, but just curious. 

thanks again for your help

Original comment by charlie....@gmail.com on 2 Apr 2010 at 8:33

GoogleCodeExporter commented 9 years ago

Original comment by charlie....@gmail.com on 2 Apr 2010 at 9:58

GoogleCodeExporter commented 9 years ago
I have a botany book that is causing force close on version 1.0.4 (not yet 
released) 
when scanned "Botany for Gardeners" 0-88192-655-8

E/AndroidRuntime(30722): java.lang.RuntimeException: An error occured while 
executing 
doInBackground()
E/AndroidRuntime(30722):    at android.os.AsyncTask$3.done(AsyncTask.java:200)
E/AndroidRuntime(30722):    at 
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
E/AndroidRuntime(30722):    at 
java.util.concurrent.FutureTask.setException(FutureTask.java:124)
E/AndroidRuntime(30722):    at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
E/AndroidRuntime(30722):    at 
java.util.concurrent.FutureTask.run(FutureTask.java:137)
E/AndroidRuntime(30722):    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
E/AndroidRuntime(30722):    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
E/AndroidRuntime(30722):    at java.lang.Thread.run(Thread.java:1096)
E/AndroidRuntime(30722): Caused by: java.lang.NullPointerException
E/AndroidRuntime(30722):    at 
com.totsp.bookworm.BookEntryResult$GetBookDataTask.doInBackground(BookEntryResul
t.jav
a:130)
E/AndroidRuntime(30722):    at 
com.totsp.bookworm.BookEntryResult$GetBookDataTask.doInBackground(BookEntryResul
t.jav
a:1)
E/AndroidRuntime(30722):    at android.os.AsyncTask$2.call(AsyncTask.java:185)
E/AndroidRuntime(30722):    at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)

Original comment by charlie....@gmail.com on 2 Apr 2010 at 10:00

GoogleCodeExporter commented 9 years ago
Aha! My Botany book has 2 codes on the back, on the lower left of the cover is 
a "UPC" 
code that scans as a "product" and results in ISBN 00881926558, and the right 
is 
another code, labeled "EAN" that scans as 0881926558. I just have to figure out 
how to 
distinguish no matter which code is scanned (many books probably don't have 
both, just 
have the UPC).  

Working on it . . .

Original comment by charlie....@gmail.com on 2 Apr 2010 at 10:51

GoogleCodeExporter commented 9 years ago
fwiw charlie the test book I've been using only has the one ISBN barcode on it.
also I am using BarCode ScannerV3.22

Dave M

Original comment by dmac...@gmail.com on 2 Apr 2010 at 10:56

GoogleCodeExporter commented 9 years ago
I now have this fixed so that there is no longer a force close. I am also 
parsing 
anything that resembles an ISBN into a valid ISBN, but still, some scans (10% 
or so 
in my experience with my own bookshelf and a few hundred scans) return a 
PRODUCT CODE 
and not an ISBN (even if the code written on the book says "ISBN - X" on the 
top of 
it, it's the bottom number, which is not the same as that, that gets returned). 
 I 
can't figure out a way, yet, to go from product code to ISBN. I tried a bunch 
of 
stuff. 

Right now I am going to try to improve the feedback to the user, and then will 
close 
this and make a new release. I don't know if I will be able to go from product 
code 
to ISBN, there may just simply be some books that won't scan as recognizable 
books 
(mostly older titles). 

Original comment by charlie....@gmail.com on 3 Apr 2010 at 1:42

GoogleCodeExporter commented 9 years ago
Not released yet, in testing, but fixed. 

Original comment by charlie....@gmail.com on 3 Apr 2010 at 2:36

GoogleCodeExporter commented 9 years ago
I have verified the FC after scanning is fixed, thanks Charlie. 
Tested 5 or 6 few moments ago with no issues :)

Original comment by dmac...@gmail.com on 3 Apr 2010 at 2:38

GoogleCodeExporter commented 9 years ago
Thank *you* David.  I didn't send you the latest release yet, but I am gonna 
put it in 
the market momentarily anyway.  

And, I'm gonna get you some Google and Android stuff for helping me out ;).  I 
get 
schwag from Google every once in a while (Android toys, shirts, pens, 
stickers), I'll 
see to it that some is saved for you. Your help has been awesome, I wouldn't 
have 
known where the problems were without it. 

Original comment by charlie....@gmail.com on 3 Apr 2010 at 3:03

GoogleCodeExporter commented 9 years ago
well thats very nice of you, thanks :)
I will be scanning a bunch today as soon as I get going, one thing I noticed 
when
scanning there seems to be no way to manually take a photo of the cover like 
when
manually adding. some stuff has no cover image on web search.

Original comment by dmac...@gmail.com on 3 Apr 2010 at 1:28