query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)
Posted: 28.10.2022, 14:48
Hi.
Use Zeos r7867, Lazarus 2.2.2, FPC 3.2.2, Ubuntu 16.04 32bit, Firebird 3.0.
Testing reconnection after connection lost. Found, that if TZReadOnlyQuery.Open executed in different (not main) thread on connection lost raises SIGSEGV, so connection can not be reopened. Seems, connection object is broken. ExecuteDirect instead of Query.Open works right.
Test project attached. must work with any DB.
Run application, stop Firebird, SIGSEGV raise, start Firebird, after ENTER Reconnect raise one more SIGSEGV.
TFPTimer used with option "UseTimerThread" to run in separate thread.
Similar code in Delphi 7 works right.
Use Zeos r7867, Lazarus 2.2.2, FPC 3.2.2, Ubuntu 16.04 32bit, Firebird 3.0.
Testing reconnection after connection lost. Found, that if TZReadOnlyQuery.Open executed in different (not main) thread on connection lost raises SIGSEGV, so connection can not be reopened. Seems, connection object is broken. ExecuteDirect instead of Query.Open works right.
Test project attached.
Code: Select all
'select ''Now'' from rdb$database'
Run application, stop Firebird, SIGSEGV raise, start Firebird, after ENTER Reconnect raise one more SIGSEGV.
TFPTimer used with option "UseTimerThread" to run in separate thread.
Similar code in Delphi 7 works right.