Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

possible cursor leak? #104

Open
erlangparasu opened this issue May 14, 2017 · 1 comment
Open

possible cursor leak? #104

erlangparasu opened this issue May 14, 2017 · 1 comment

Comments

@erlangparasu
Copy link

E/CursorLeakDetecter: PossibleCursorLeak:content://com.herokuapp.erlangparasu.sitmpb.tray/preferences/com.herokuapp.erlangparasu.sitmpb/SITMPBPrefKondisiLaluLintasNotifikasi.OnOff?backup=true,QueryCounter:5
                                                                                      android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
                                                                                          at android.content.ContentResolver.query(ContentResolver.java:399)
                                                                                          at android.content.ContentResolver.query(ContentResolver.java:316)
                                                                                          at net.grandcentrix.tray.provider.TrayProviderHelper.queryProvider(TrayProviderHelper.java:169)
                                                                                          at net.grandcentrix.tray.provider.TrayProviderHelper.queryProviderSafe(TrayProviderHelper.java:199)
                                                                                          at net.grandcentrix.tray.provider.ContentProviderStorage$TrayContentObserver.onChange(ContentProviderStorage.java:89)
                                                                                          at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:180)
                                                                                          at android.os.Handler.handleCallback(Handler.java:800)
                                                                                          at android.os.Handler.dispatchMessage(Handler.java:100)
                                                                                          at android.os.Looper.loop(Looper.java:194)
                                                                                          at android.os.HandlerThread.run(HandlerThread.java:60)
@passsy
Copy link
Contributor

passsy commented May 14, 2017

Can you share more details how often you see this? You are using the observer. Do you get this error every time a change happens?

As far as I can see the cursor is correctly closed in TrayProviderHelper#queryProvider.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants