Resolving java.lang.Throwable exception in an android -
i working on android application has sqlite database. after writing code in app related database operation, getting below exception. though application doesn't stop/crash, want know how resolve exception. not sure why exception occurring, suppose has sqlite operations. have closed streams, connections , cursors recommended. below stack trace:
689-698/? e/strictmode﹕ resource acquired @ attached stack trace never released. see java.io.closeable information on avoiding resource leaks. java.lang.throwable: explicit termination method 'close' not called @ dalvik.system.closeguard.open(closeguard.java:184) @ android.os.parcelfiledescriptor.<init>(parcelfiledescriptor.java:180) @ android.os.parcelfiledescriptor$1.createfromparcel(parcelfiledescriptor.java:916) @ android.os.parcelfiledescriptor$1.createfromparcel(parcelfiledescriptor.java:906) @ android.app.ibackupagent$stub.ontransact(ibackupagent.java:57) @ android.os.binder.exectransact(binder.java:446) 04-24 08:49:21.127 689-698/? e/strictmode﹕ resource acquired @ attached stack trace never released. see java.io.closeable information on avoiding resource leaks. java.lang.throwable: explicit termination method 'close' not called @ dalvik.system.closeguard.open(closeguard.java:184) @ android.os.parcelfiledescriptor.<init>(parcelfiledescriptor.java:180) @ android.os.parcelfiledescriptor$1.createfromparcel(parcelfiledescriptor.java:916) @ android.os.parcelfiledescriptor$1.createfromparcel(parcelfiledescriptor.java:906) @ android.app.ibackupagent$stub.ontransact(ibackupagent.java:64) @ android.os.binder.exectransact(binder.java:446) 04-24 08:49:21.129 689-698/? e/strictmode﹕ resource acquired @ attached stack trace never released. see java.io.closeable information on avoiding resource leaks. java.lang.throwable: explicit termination method 'close' not called @ dalvik.system.closeguard.open(closeguard.java:184) @ android.os.parcelfiledescriptor.<init>(parcelfiledescriptor.java:180) @ android.os.parcelfiledescriptor$1.createfromparcel(parcelfiledescriptor.java:916) @ android.os.parcelfiledescriptor$1.createfromparcel(parcelfiledescriptor.java:906) @ android.app.ibackupagent$stub.ontransact(ibackupagent.java:71) @ android.os.binder.exectransact(binder.java:446)
could please explain when exception occur , how resolve it?
like log says:
a resource acquired @ attached stack trace never released. see java.io.closeable information on avoiding resource leaks.
explicit termination method 'close' not called
note callstack shows resource created. message printed when resource garbage-collected , notices wasn't closed.
in case, can see resource parcelfiledescriptor
, , created automatically ibackupagent$stub.ontransact()
method (i.e., when backupagent getting call through binder).
the log should disappear if make sure close parcelfiledescriptors passed backupagent subclass.
Comments
Post a Comment