I am getting this error:
USER_COMMENT=
APP_VERSION_CODE=44
APP_VERSION_NAME=2.0
ANDROID_VERSION=4.0.3
PHONE_MODEL=Transformer Prime TF201
CUSTOM_DATA=
STACK_TRACE=java.lang.NullPointerException
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:231)
at com.mypackage.BLL_FriendRequest.findRowByID(BLL_FriendRequest.java:75)
at com.mypackage.Global$6.onComplete(Global.java:400)
at com.mypackage.AsyncRequestListener.onComplete(AsyncRequestListener.java:58)
at com.mypackage.AsyncRunner$3.run(AsyncRunner.java:360)
I have checked the SQLiteOpenHelper.java and at line 157 it is doing something mContext.CreateTable(bla bla bla);…. so I think the context is null… what can be used instead.. Tried to use getApplicationContext() but of no use.
Also this kind of exception do not occur regularly, but some of the users are experiencing this.
obviously (!) BLL_FriendRequest::75 is calling getReadableDatabase.
It then calls getWritableDatabase, because that’s what getReadableDatabase does.
It is not calling createTable(blablabla) (because the table creation would be up to you) but rather openOrCreateDatabase.
I don’t see how the context could be null, since you probably are using it before that (it is often ‘this’ from inside an activity). It is possible that the exception is raised in a native implementation of the context.
Anyway, you probable need to test for null on your context and try/catch the around the database creation. It is possible that it is temporary and that you can try again a little later.