GCX-HCI / tray

a SharedPreferences replacement for Android with multiprocess support
Apache License 2.0
2.29k stars 273 forks source link

possible cursor leak? #104

Open erlangparasu opened 7 years ago

erlangparasu commented 7 years ago
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 commented 7 years ago

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.