Kotlin / anko

Pleasant Android application development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cursor is closed twice or more

nfode opened this issue · comments

On an HTC device with Android 7.0 I get the following exception:

W/SQLiteCursor: Close cursor android.database.sqlite.SQLiteCursor@84c760f on ValueCollection twice or more

The same app works perfectly fine on a Motorola Device with Android 7.1 and on several other devices from different vendors.

Now is my question if someone else experiences the same problem.

A comment here also has the same problem on HTC devices which is kinda weird.

Is it possible to apply the same fix here:

if(!cursor.isClosed()) {
    cursor.close()
}

I tried to clone the project but the build failed in the end and I do not have the knowledge to debug it.

Thank you in advance!

Are you sure it is an exception? As you may see in the provided code all exceptions from close are being eaten.

Yes, this also confused me. Luckily it works on all other devices.