Giter Site home page Giter Site logo

Comments (7)

simolus3 avatar simolus3 commented on September 6, 2024

Are you continuing to use the existing database natively? If so, does that also report errors about malformed database images?

I think this might be a concurrency issue, but we're compiling sqlite with thread-safe options so it should be fine. I wonder if the native side might be using the database without thread safety, but it seems unlikely when using the default Android APIs.

from sqlite3.dart.

tuceturan avatar tuceturan commented on September 6, 2024

what do you mean for " I wonder if the native side might be using the database without thread safety" sorry ı couldn't understand

from sqlite3.dart.

simolus3 avatar simolus3 commented on September 6, 2024

I don't think this is the source of the problem, but if two threads are using the same sqlite3 database and that database hasn't been configured to be used with thread safety (an option in sqlite3), that might corrupt the database. But again, this is unlikely the problem here.

Do you have a way to check whether you're also getting the malformed database errors natively, or are you only accessing the database in Dart now?

from sqlite3.dart.

tuceturan avatar tuceturan commented on September 6, 2024

just accessting database in dart

from sqlite3.dart.

Den-creator avatar Den-creator commented on September 6, 2024

have the similar issue

from sqlite3.dart.

simolus3 avatar simolus3 commented on September 6, 2024

@Den-creator Could you also describe your setup in a bit more detail (e.g. does this only happen on some platforms/operating systems, are you opening multiple connections to the same database file (even in different threads), did you notice anything else that seems to cause this problem or make it more likely)? At the moment I don't really have enough information to investigate this, so everything helps.

from sqlite3.dart.

Den-creator avatar Den-creator commented on September 6, 2024

@simolus3 flutter app, drift: ^2.16.0, flutter: 3.19.3, Android 12, Pixel 3, one connection to data base, looks like it has happened after upgrade to flutter 3.16.9, but maybe it is coincidence.

AccelerometerDataDao.batchInsertFrom.error SqliteException(11): while executing statement, database disk image is malformed, database disk image is malformed (code 11).│ Causing statement: INSERT INTO "raw_accelerometer_table" ("raw_text") VALUES (?), parameters: accelerometer,VIVOSMART_5,2024-03-26T17:40:53.477,2024-03-26T17:41:08.762,-960,204,-352.

Raw Accelerometer Data Upload error: SqliteException(11): while executing statement, database disk image is malformed, database disk image is malformed (code 11).│ Causing statement: DELETE FROM "raw_accelerometer_table" WHERE "id" <= ?;, parameters: 282453

from sqlite3.dart.

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.