View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005493 | CaseTalk Modeler | Other | public | 2026-03-30 17:16 | 2026-03-30 21:55 |
| Reporter | Marco Wobben | Assigned To | Marco Wobben | ||
| Priority | high | Severity | crash | Reproducibility | have not tried |
| Status | resolved | Resolution | fixed | ||
| Target Version | 15.0 | Fixed in Version | 15.0 | ||
| Summary | 0005493: Application freezes: SQLite deadlock in NamespacesDmd.SaveTmrTimer | ||||
| Description | Application frozen. Main thread blocked in RtlEnterCriticalSection inside TSQLiteStatement.ExecuteBase — waiting for a SQLite critical section that is held by another thread. The deadlock occurs during a timer-driven namespace save (NamespacesDmd.SaveTmrTimer). Call chain: Likely cause: the SaveTmrTimer fires while another thread holds the SQLite connection lock (e.g. FastLoad or InternalSchema query running concurrently). | ||||
| Tags | No tags attached. | ||||
| CaseTalk Edition | Corporate | ||||
|
Fixed in DbDmdUnit.pas: FastLoadScriptCallback called GenerateFTS and ApplyPersistentScript directly on the FastLoad worker thread. Both use DbDmd.Conn (settings.sdb), whose FireDAC connection-level critical section is not thread-safe. This created a classic lock+Synchronize deadlock: (1) FastLoad worker holds DbDmd.Conn CS (executing a statement), (2) main thread blocks in NamespacesQry.Open waiting for that same CS, (3) FastLoad worker then calls RadioStationEtc.EndUpdate(NRL_SQLBUSY) which uses TThread.Synchronize — waits for main thread — deadlock. Fix: wrapped both GenerateFTS and ApplyPersistentScript in TThread.Synchronize so they always execute on the main thread. TThread.Synchronize is a no-op when already on main thread, so this is safe regardless of caller context. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-03-30 17:16 | Marco Wobben | New Issue | |
| 2026-03-30 17:16 | Marco Wobben | View Status | public => private |
| 2026-03-30 17:17 | Marco Wobben | Target Version | => 15.0 |
| 2026-03-30 17:17 | Marco Wobben | View Status | private => public |
| 2026-03-30 17:17 | Marco Wobben | Summary | Application freezes: SQLite deadlock in NamespacesDmd.SaveTmrTimer (ProRail) => Application freezes: SQLite deadlock in NamespacesDmd.SaveTmrTimer |
| 2026-03-30 17:17 | Marco Wobben | Description Updated | |
| 2026-03-30 17:36 | Marco Wobben | Assigned To | => Marco Wobben |
| 2026-03-30 17:36 | Marco Wobben | Status | new => resolved |
| 2026-03-30 17:36 | Marco Wobben | Resolution | open => fixed |
| 2026-03-30 17:36 | Marco Wobben | Fixed in Version | => 15.0 |
| 2026-03-30 17:37 | Marco Wobben | Note Added: 0005927 |