brikell69 / nookdevs

Automatically exported from code.google.com/p/nookdevs
0 stars 0 forks source link

nookLibrary 0.0.7 crashes during startup scan #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
nookLibrary 0.0.6 worked fine, but 0.0.7 crashes back to the home screen 
during the startup scan.  Here is what logcat reports:

E/Database(18907): sqlite3_open_v2
("/data/data/com.nookdevs.library/databases/myBooks.db", &handle, 6, NULL) 
failed
E/OtherBooks(18907): Exception querying datbase
E/OtherBooks(18907): android.database.sqlite.SQLiteException: unable to 
open database file
E/OtherBooks(18907):    at android.database.sqlite.SQLiteDatabase.dbopen
(NativeMethod)
E/OtherBooks(18907):    at android.database.sqlite.SQLiteDatabase.<init>
(SQLiteDatabase.java:1583)
E/OtherBooks(18907):    at 
android.database.sqlite.SQLiteDatabase.openDatabase
(SQLiteDatabase.java:638)
E/OtherBooks(18907):    at 
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:659)
E/OtherBooks(18907):    at 
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:652)
E/OtherBooks(18907):    at 
android.app.ApplicationContext.openOrCreateDatabase
(ApplicationContext.java:463)
E/OtherBooks(18907):    at 
android.content.ContextWrapper.openOrCreateDatabase
(ContextWrapper.java:181)
E/OtherBooks(18907):    at 
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase
(SQLiteOpenHelper.java:98)
E/OtherBooks(18907):    at com.nookdevs.library.OtherBooks.getBooksFromDB
(OtherBooks.java:183)
E/OtherBooks(18907):    at com.nookdevs.library.OtherBooks.getOtherBooks
(OtherBooks.java:263)
E/OtherBooks(18907):    at com.nookdevs.library.NookLibrary$7.run
(NookLibrary.java:397)
E/OtherBooks(18907):    at java.lang.Thread.run(Thread.java:1058)
I/nookLibrary(18907): scanner service connected ...ComponentInfo
{com.bravo.ecmscannerservice/com.bravo.ecmscannerservice.ECMScannerService}
E/OtherBooks(18907): Error adding books to DB
W/dalvikvm(18907): threadid=19: thread exiting with uncaught exception 
(group=0x4000fe68)
E/AndroidRuntime(18907): Uncaught handler: thread Thread-15 exiting due to 
uncaught exception
E/AndroidRuntime(18907): java.lang.NullPointerException
E/AndroidRuntime(18907):        at 
com.nookdevs.library.OtherBooks.addBookToDB(OtherBooks.java:176)
E/AndroidRuntime(18907):        at 
com.nookdevs.library.NookLibrary.loadCovers(NookLibrary.java:467)
E/AndroidRuntime(18907):        at 
com.nookdevs.library.NookLibrary.access$6(NookLibrary.java:457)
E/AndroidRuntime(18907):        at com.nookdevs.library.NookLibrary$1$1.run
(NookLibrary.java:310)
E/AndroidRuntime(18907):        at java.lang.Thread.run(Thread.java:1058)
E/ActivityManager( 1804): SUPPRESSING CRASH DIALOG.....

Original issue reported on code.google.com by jmc...@gmail.com on 16 Mar 2010 at 12:13

GoogleCodeExporter commented 9 years ago
Figured out what the problem was.  The 
folder "/data/data/com.nookdevs.library/databases" did not exist for some 
reason, 
and nookLibrary failed to create it.  Once I manually created the folder from 
adb 
shell with mkdir, nookLibrary 0.0.7 ran just fine and created the "myBooks.db" 
file 
within the "databases" folder.

Original comment by jmc...@gmail.com on 16 Mar 2010 at 12:21

GoogleCodeExporter commented 9 years ago
Hi,
can you check the permissions for this folder?
   /data/data/com.nookdevs.library/

Original comment by hari.swa...@gmail.com on 16 Mar 2010 at 12:39

GoogleCodeExporter commented 9 years ago
Permissions of 3rd-party app folders under /data/data
drwxr-xr-x app_11   app_11            2010-03-15 19:15 com.nookdevs.library
drwxr-xr-x app_0    app_0             2010-02-07 18:04 com.nookdevs.wifi
drwxr-xr-x app_8    app_8             2010-02-06 20:10 com.nookdevs.browser
drwxr-xr-x app_11   app_11            2010-02-19 21:19 com.nookdevs.filemanager
drwxr-xr-x app_9    app_9             2010-02-07 10:46 com.nookdevs.launcher
drwxr-xr-x app_14   app_14            2010-02-09 16:48 com.kbs.trook
drwxr-xr-x app_13   app_13            2010-02-06 11:05 com.pandora.android

I wonder if the problem could have been that both com.nookdevs.library and 
com.nookdevs.filemanager are owned by app_11?

Original comment by jmc...@gmail.com on 16 Mar 2010 at 1:06

GoogleCodeExporter commented 9 years ago
yes. Each app should have it's own app id except for the system apps. 
check the app id for nookLibrary using the ps command.

Original comment by hari.swa...@gmail.com on 16 Mar 2010 at 1:58

GoogleCodeExporter commented 9 years ago
btw, I found few issues in the B&N books refresh logic. Just updated it and 
uploaded 
the package. Same version nbr though. 

Original comment by hari.swa...@gmail.com on 16 Mar 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Thanks.  nookLibrary was app_15.  I assume it was app_11 at some point.  Not 
sure 
what happened.  In any case, fixed.

Original comment by jmc...@gmail.com on 16 Mar 2010 at 4:35