As emerges from
https://forum.lazarus.freepascal.org/index.php/topic,66432.0.htmlif the following situation occurs:
- there are multiple threads
- each thread accesses one or more sqlite databases
- each sqlite database is accessed only by one thread
- every time one database is accessed, all the connection/transation/query objects are created and destroyed
It is possible to experience access violations, apparently due to the malfunction of the multithreaded refcouting system implemented in the fp software to wrap the libsqlite3.so (tested in linux, I have done no test for windows).
At the moment the workaround is to call
before any sqlite db operation is made (example at program startup), then and call
after all sqlite db operation were made (example at program end).