AccessViolation in destructor of TRemoteDBDatabase

TRemoteDBDatabase.Free leads to an AccessViolation.

Here is the Callstack leading to this error:

RemoteDB.Client.Database.TRemoteDBDatabase.StopKeepAlive
RemoteDB.Client.Database.TRemoteDBDatabase.DestroyDBInstance(True)
RemoteDB.Client.Database.TRemoteDBDatabase.DoDisconnect
RemoteDB.Client.Database.TRemoteDBDatabase.Destroy

Because you free FKeepAliveTimer before DoDisconnect is called.
StopKeepAlive tries to Update the Timer if ServerVersion >= 2 and mswindows is used...

If you would call DoDisconnect before FKeepAliveTimer.Free this would work fine.
(or you should FreeAndNil it and check if it's Assigned within StopKeepAlive)

Thank you for the feedback, @Silber_Felix. Indeed, we will destroy the timer after calling DoDisconnect.
You can manually change your source code there as well. Next version will have this fixed.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.