External SIGSEV (Database is locked) lazarus / 16-Databases ---------------------------------------------------------------------- Ylmith · 2026-02-10 15:54 Bonjour, je travaille avec Lazarus sur une application qui utilisait une base Access, mais devant tous les changements néfastes qui se profilent chez Microsoft j'ai décidé de porter les tables de l'application vers SQLite (que j'utilise par ailleurs régulièrement) Il y a juste 2 tables, elles s'ouvrent sans problème dans les forms (DBGrids) mais génèrent le même type d'erreur quand j'essaie de faire  des mises à jour (Update) Je reçois le message " Database is locked" et ensuite dans la fenêtre de l'assembleur 00000000007E924E 8890A0000000      mov [rax+$000000A0],dl qui correspond, selon tout ce que j'ai lu, à une erreur mémoire. J'ai demandé à Perplexity de me donner les raisons d'une telle erreur et les solutions, j'ai, je crois, tout vérifié et essayé mais sans succès...d'où ce post. merci d'avance. ---------------------------------------------------------------------- 440bx · 2026-02-10 16:07 The above text in English is: Hello, I'm working with Lazarus on an application that used an Access database, but given all the negative changes looming at Microsoft, I decided to migrate the application's tables to SQLite (which I also use regularly). There are just two tables; they open without any problem in the forms (DBGrids), but generate the same type of error when I try to perform updates. I receive the message: "Database is locked" and then in the assembler window: 00000000007E924E 8890A0000000 mov [rax+$000000A0],dl which, according to everything I've read, corresponds to a memory error. I asked Perplexity to explain the reasons for this error and provide solutions. I think I've checked and tried everything, but without success...hence this post. Thanks in advance. @Ylmith Posts in the international section are expected to be in English.  Also, you're much more likely to get help if more people understand the message (which is likely to be a higher number for a message in English) ---------------------------------------------------------------------- Ylmith · 2026-02-10 16:34 ok, thanks ---------------------------------------------------------------------- cdbc · 2026-02-10 16:37 Hi Hmmm, do you by any chance have the database active/open in the Lazarus IDE?!? If it's an internal sqlite-lock, sometimes you can use "sqlite3" app (from the commandline) to copy / backup the db-file, so you can get to using it again... Regards Benny ---------------------------------------------------------------------- Zvoni · 2026-02-11 07:26 That's a classic with SQLite, specifically when using DB-Bound controls and/or a separate DB-Management-Program (DB-Browser for SQLite, DBeaver etc.) in parallel first line after opening do a ExecSQL with "pragma journal_mode=wal" and you're set EDIT: Just checked fpc3.2.3 (fixes) If you're on fixes, adding a Param "journal_mode=wal" before opening your connection is enough They changed the "DoInternalConnect" for SQLite3Connection there. Though why they are handling only 2 Pragmas is beyond me. Nevermind the Params are not sanitized. (No check if someone adds "PRAGMA journal_mode=wal" which would result in "PRAGMA PRAGMA journal_mode=wal") EDIT2: Correction: It would result in no execution of the Pragma at all, since they can't find the "name"-Part in Params. Even worse....