bparmentier / WiFiKeyShare

Share Wi-Fi passwords with QR codes or NFC tags
https://wifikeysha.re
GNU General Public License v3.0
118 stars 40 forks source link

Screen rotation may produce an IllegalStateException if WifiListTask is not finished #2

Open bparmentier opened 8 years ago

bparmentier commented 8 years ago
01-22 08:44:58.803 30673-30673/be.brunoparmentier.wifikeyshare D/AndroidRuntime: Shutting down VM
01-22 08:44:58.804 30673-30673/be.brunoparmentier.wifikeyshare E/AndroidRuntime: FATAL EXCEPTION: main
         Process: be.brunoparmentier.wifikeyshare, PID: 30673
         java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/be.brunoparmentier.wifikeyshare/databases/wifi_keys_db
             at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
             at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1158)
             at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1034)
             at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1202)
             at be.brunoparmentier.wifikeyshare.db.WifiKeysDataSource.getSavedWifiWithKeys(WifiKeysDataSource.java:71)
             at be.brunoparmentier.wifikeyshare.activities.WifiListActivity.setSavedKeysToWifiNetworks(WifiListActivity.java:335)
             at be.brunoparmentier.wifikeyshare.activities.WifiListActivity.access$500(WifiListActivity.java:57)
             at be.brunoparmentier.wifikeyshare.activities.WifiListActivity$WifiListTask.onPostExecute(WifiListActivity.java:329)
             at be.brunoparmentier.wifikeyshare.activities.WifiListActivity$WifiListTask.onPostExecute(WifiListActivity.java:266)
             at android.os.AsyncTask.finish(AsyncTask.java:636)
             at android.os.AsyncTask.access$500(AsyncTask.java:177)
             at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
             at android.os.Handler.dispatchMessage(Handler.java:102)
             at android.os.Looper.loop(Looper.java:135)
             at android.app.ActivityThread.main(ActivityThread.java:5294)
             at java.lang.reflect.Method.invoke(Native Method)
             at java.lang.reflect.Method.invoke(Method.java:372)
             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
01-22 08:44:58.806 27479-28268/system_process W/ActivityManager:   Force finishing activity 1 be.brunoparmentier.wifikeyshare/.activities.WifiListActivity