05-17-2015, 04:14 PM
As a side note, I've heard multiple reports now of database problems due to the companion app, and I believe it may be due to the way I'm copying the database file from the PC to the tablet. I think what I'm currently doing is inherently unsafe. SQLite uses some advanced techniques to prevent database corruption, including the use of a journal file, which can delay when data that has been written to the database is actually present in the database file (transactions all go through the journal file first). I think it's possible for the companion to be sending the bytes of the database file when the file isn't in a proper state for that to be done. I'm going to try changing the companion app to use the SQLite backup api to create a copy of the database that is safe to send to the tablet. I will probably also change the tablet to clear out any journal file that is present if I replace the database, as I think having an invalid journal file present could also cause problems. I will also be working on adding more protection against possible disconnects while file transfers are still active.
Mike
Mike