In my Application using remote DB I experienced sporadic crashes that exit the application in any state without any error message or trace.
I now included the source of Aurelius, Sparkle and Remotedb and get this sporadit event out of nothing. And if the program is running outside the IDE it just is gone without any message.
Hello Michael,
Thanks for the hint. I hat jvAppEvents on the main form and replaced it by the stock Application Events and check now. Things like this frighten me as they are not really traceable.
Thanks once more for yout Tipp, it seems to have disappeared after I replaced jvAppEvents by the stock ApplicationEvents component, removed unused uses and updated jcl/jvcl to the latest version. Also the strange debugger events when running the client in the IDE seem to have disappeared. As I did not change anything related to the TMS components it was not related to RemoteDB or Sparkle.
After my first euphoric success I experienced it again but intensive research has taken me to the point that using remoteDB in a Background Thread seems to cause the problems. Is it possible that remoteDB is not thread safe? I will write a server function for that and query it by https as the server side FireDac is fully thread safe.
RemoteDB can't rely on thread-safety of the underlying db component, because not all of them are thread safe. A TRemoteDBDatabase client-side is not assumed to be thread-safe, it would be better you use a different TRemoteDBDatabase for each thread.
I created the Remote-DB object in the Treads execute method and destroyed it after processing. But somehow this lead to problems, although I used synchronize to update the GUI. I also saw the crashes after havong disposed the Form with the background threads, minutes later.