You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2018/12/26 08:40:42 UTC

[GitHub] lvfen opened a new pull request #1970: Android data base fix

lvfen opened a new pull request #1970: Android data base fix
URL: https://github.com/apache/incubator-weex/pull/1970
 
 
   fix a crash for storageModule:
   crash stack
   java stack
   java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
   at android.database.sqlite.SQLiteConnectionPool.throwIfClosedLocked(SQLiteConnectionPool.java:962)
   at android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:599)
   at android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:348)
   at android.database.sqlite.SQLiteSession.acquireConnection(SQLiteSession.java:894)
   at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:650)
   at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:125)
   at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:886)
   at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:874)
   at android.database.sqlite.SQLiteDatabase.getPageSize(SQLiteDatabase.java:941)
   at android.database.sqlite.SQLiteDatabase.setMaximumSize(SQLiteDatabase.java:924)
   at com.taobao.weex.appfram.storage.WXSQLiteOpenHelper.ensureDatabase(WXSQLiteOpenHelper.java:179)
   at com.taobao.weex.appfram.storage.WXSQLiteOpenHelper.getDatabase(WXSQLiteOpenHelper.java:78)
   at com.taobao.weex.appfram.storage.DefaultWXStorage.performGetItem(DefaultWXStorage.java:239)
   at com.taobao.weex.appfram.storage.DefaultWXStorage.access$100(DefaultWXStorage.java:39)
   at com.taobao.weex.appfram.storage.DefaultWXStorage$2.run(DefaultWXStorage.java:79)
   at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java:48)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
   at java.lang.Thread.run(Thread.java:818)
   
   This exception is caused by asynchronous read and write db, so add try catch to db operation and move close operation to same thread

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services