Git Product home page Git Product logo

Comments (7)

npurushe avatar npurushe commented on August 25, 2024

Could you share what about Android N causes an issue? this library doesn't link against the system sqlite version, instead it contains its own separate version. There is a another issue mentioned that is maybe more relevant about multiple sqlite instances linked to an app, I think that is true you should avoid using the Android OS sqlite APIs and this libraries APIs on the same db file at the same time but that is true for any Android OS version. Is that the issue you think you were seeing ?

from sqlite-android.

M66B avatar M66B commented on August 25, 2024

Please see here for what I know, which is not much, unfortunately:

https://github.com/M66B/FairEmail/blob/master/FAQ.md#redmi

I am not 100% sure if this is the issue, though. With the data gone, debugging and error reporting become hard, not to say impossible.

I can say it is happening more often than before, possibly because the number of people using Android N or later is increasing.

I also know that, for example, the Android work manager uses sqlite as well.

from sqlite-android.

M66B avatar M66B commented on August 25, 2024

There is some more information here:

https://ericsink.com/entries/multiple_sqlite_problem.html

from sqlite-android.

M66B avatar M66B commented on August 25, 2024

Linking two sqlite libraries (requery's and Android's) is known to result in occasional corruption:

https://sqlite.org/howtocorrupt.html#multiple_copies_of_sqlite_linked_into_the_same_application

There is a proof of concept here:

https://github.com/jeremysheeley/Android_N_SQLite_Corruption

from sqlite-android.

npurushe avatar npurushe commented on August 25, 2024

For those cases the two instances have to be operating on the same database file. As long as you ensure you are not using both apis concurrently on the same database file there should be no issue.

from sqlite-android.

M66B avatar M66B commented on August 25, 2024

That was my thought too, but in practice I am still seeing more database corruption than expected.

I will respond here after a while if I see changes.

from sqlite-android.

M66B avatar M66B commented on August 25, 2024

I haven't seen any case of data loss anymore since removing this library from the app. That can't be coincidence.

from sqlite-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.