03-02 04:23:07.015: E/StrictMode(1096): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. 03-02 04:23:07.015: E/StrictMode(1096): java.lang.Throwable: Explicit termination method 'close' not called 03-02 04:23:07.015: E/StrictMode(1096): at dalvik.system.CloseGuard.open(CloseGuard.java:184) 03-02 04:23:07.015: E/StrictMode(1096): at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:805) 03-02 04:23:07.015: E/StrictMode(1096): at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789) 03-02 04:23:07.015: E/StrictMode(1096): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:944) 03-02 04:23:07.015: E/StrictMode(1096): at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:224) 03-02 04:23:07.015: E/StrictMode(1096): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:188) 03-02 04:23:07.015: E/StrictMode(1096): at com.helper.database.DBOperator.queryfeeds(DBOperator.java:53) 03-02 04:23:07.015: E/StrictMode(1096): at com.example.rssreader.MainActivitySpace.getfeeddata(MainActivitySpace.java:85) 03-02 04:23:07.015: E/StrictMode(1096): at com.example.rssreader.MainActivitySpace.onActivityCreated(MainActivitySpace.java:74) 03-02 04:23:07.015: E/StrictMode(1096): at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1508) 03-02 04:23:07.015: E/StrictMode(1096): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:947) 03-02 04:23:07.015: E/StrictMode(1096): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) 03-02 04:23:07.015: E/StrictMode(1096): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682) 03-02 04:23:07.015: E/StrictMode(1096): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467) 03-02 04:23:07.015: E/StrictMode(1096): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.Activity.performStart(Activity.java:5253) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2149) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.ActivityThread.access$700(ActivityThread.java:135) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397) 03-02 04:23:07.015: E/StrictMode(1096): at android.os.Handler.dispatchMessage(Handler.java:102) 03-02 04:23:07.015: E/StrictMode(1096): at android.os.Looper.loop(Looper.java:137) 03-02 04:23:07.015: E/StrictMode(1096): at android.app.ActivityThread.main(ActivityThread.java:4998) 03-02 04:23:07.015: E/StrictMode(1096): at java.lang.reflect.Method.invokeNative(Native Method) 03-02 04:23:07.015: E/StrictMode(1096): at java.lang.reflect.Method.invoke(Method.java:515) 03-02 04:23:07.015: E/StrictMode(1096): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777) 03-02 04:23:07.015: E/StrictMode(1096): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593) 03-02 04:23:07.015: E/StrictMode(1096): at dalvik.system.NativeStart.main(Native Method)
"Explicit termination method 'close' not called" what's means?
Asked Answered
The problem I have found a lot of places: 1.cursor is not closed 2 database operation "content" has no value In addition, I doubt Is it right? My version Android configuration caused by high, but I'm not sure. The problem I have puzzled many days –
Agneta
You need to explicitly call the close on a cursor before it goes out of scope. If you do not do it the content of the cursor and so its allocated resources won't be freed until the garbage collector will decide to actually delete it. Since the cursor requires a big amount of resources it is a good practice to close it as soon as it is not used anymore.
Is there a way how to generally debug those issues? Are there any tools that help? –
Iconoclasm
as far as I know the StrictMode is the debug tool that you need. –
Escudo
Hi, this is an error that occurs quite frequently in my app: What do I need to do? 05-24 16:58:31.582 9405-9414/com.android.mms E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. java.lang.Throwable: Explicit termination method 'release' not called at dalvik.system.CloseGuard.open(CloseGuard.java:184) at android.drm.DrmManagerClient.<init>(DrmManagerClient.java:258) at com.google.android.mms.pdu.PduPersister.<init>(PduPersister.java:288) –
Iconoclasm
@Iconoclasm you should really open another question and put some more info about what you are doing and what you get –
Escudo
© 2022 - 2024 — McMap. All rights reserved.