dwalkes / WakeMeSki

An application for the Android OS which turns your phone into a ski or snowboard alarm clock with ski resort monitoring features. This project is based on android-ski-report found at http://code.google.com/p/android-ski-report/
www.wakemeski.com
7 stars 0 forks source link

close() was never explicitly called on database when refreshing after displaying alerts view #24

Closed dwalkes closed 13 years ago

dwalkes commented 13 years ago

1) Open the AlertsActivity with one or more snow alerts. 2) Use the back button to go back to the main report view. 3) Refresh. You will see a bunch of error messages spew on adb logcat, see examples below.

12-21 22:30:23.142 E/Database(31084): close() was never explicitly called on database '/data/data/com.wakemeski/databases/alerts.db' 12-21 22:30:23.142 E/Database(31084): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here 12-21 22:30:23.142 E/Database(31084): at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1810) 12-21 22:30:23.142 E/Database(31084): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817) 12-21 22:30:23.142 E/Database(31084): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:851) 12-21 22:30:23.142 E/Database(31084): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:844) 12-21 22:30:23.142 E/Database(31084): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:540) 12-21 22:30:23.142 E/Database(31084): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203) 12-21 22:30:23.142 E/Database(31084): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:112) 12-21 22:30:23.142 E/Database(31084): at com.wakemeski.core.alert.AlertManager.(AlertManager.java:94) 12-21 22:30:23.142 E/Database(31084): at com.wakemeski.ui.AlertsActivity.onCreate(AlertsActivity.java:25) 12-21 22:30:23.142 E/Database(31084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 12-21 22:30:23.142 E/Database(31084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 12-21 22:30:23.142 E/Database(31084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 12-21 22:30:23.142 E/Database(31084): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 12-21 22:30:23.142 E/Database(31084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 12-21 22:30:23.142 E/Database(31084): at android.os.Handler.dispatchMessage(Handler.java:99)

doanac commented 13 years ago

Fixed by: 2611792361395818978d852bc5a4b2eeb8010f7b