android - CursorWindowAllocationException thrown in SyncAdapter -


i following exception thrown in syncadapter class. think closing cursors correctly. can there other explanation why exception being thrown? or missing cursor.close() somewhere?

fatal exception: android.database.cursorwindowallocationexception: cursor window not created binder.        @ android.database.cursorwindow.<init>(cursorwindow.java:150)        @ android.database.cursorwindow.<init>(cursorwindow.java:42)        @ android.database.cursorwindow$1.createfromparcel(cursorwindow.java:698)        @ android.database.cursorwindow$1.createfromparcel(cursorwindow.java:696)        @ android.database.bulkcursordescriptor.readfromparcel(bulkcursordescriptor.java:75)        @ android.database.bulkcursordescriptor$1.createfromparcel(bulkcursordescriptor.java:34)        @ android.database.bulkcursordescriptor$1.createfromparcel(bulkcursordescriptor.java:30)        @ android.content.contentproviderproxy.query(contentprovidernative.java:424)        @ android.content.contentproviderclient.query(contentproviderclient.java:161)        @ android.content.contentproviderclient.query(contentproviderclient.java:123)        @ com.forever.forever.utils.sync.syncadapter.getnextiteminuploadqueue(syncadapter.java:799)        @ com.forever.forever.utils.sync.syncadapter.proccessuploads(syncadapter.java:697)        @ com.forever.forever.utils.sync.syncadapter.onperformsync(syncadapter.java:199)        @ android.content.abstractthreadedsyncadapter$syncthread.run(abstractthreadedsyncadapter.java:272) 

i able find additional closable leaks adding following snippet application oncreate():

    if(buildconfig.debug){         strictmode.setvmpolicy(new strictmode.vmpolicy.builder()                 .detectleakedsqlliteobjects()                 .detectleakedclosableobjects()                 .penaltylog()                 .build());     } 

it logged couple leaks able fix. extremely helpful development tool.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -