Hello,
after refitting a mobile application with SecureBridge to enable SFTP data exchange I have encountered the following problem:
In irregular intervals the app crashes fatally when performing an SFTP data exchange. With the help of the debugger I could find out that the crash was caused by an external exception, which in an FMX context usually means an access violation.
Furthermore with the debugger I was able to narrow it down to the exact line of code that causes it:
Generally it occurs when disconnecting the TScSSHClient, specifically it is the command "TmpConnection.Free" (line 606) in the method "TScSSHClient.DoDisconnect" in the unit "ScSSHClient.pas".
As mentioned this only occurs irregularly. The majority of times it works, but when it doesn't, the whole app crashes, regardless of exception-handling. Also, the issue seems to occur only on IOS.
My implementation is based on the SFTP-Client-Sample, but adapted to my needs: The whole data-exchange occurs in a thread, whose purpose it is to look for data on a given server in the background: Therefore creating and initializing the components, connecting, looking for specific data on the server, disconnecting and destroying the components again is all done automatically instead of being triggered manually.
Since the app itself is quite complex and the problem is occuring on IOS, it would be rather difficult for me to construct a sample project, but if necessary I can probably do so.
My hope would be however, that this information were sufficient for you to recognize what might have gone wrong.
Even a simple description of what an exception at this line of code means would probably be very helpful for me.
I am using Rad Studio 11.3 and the latest SecureBridge Version 10.3.1 from April.