Sporadic crashes

In my Application using remote DB I experienced sporadic crashes that exit the application in any state without any error message or trace.

We searched all background threads for syncing errors or so but also if all background activity is disabled the application sometimes exits without any reason.

Running in the debugger I could track down the sporadic error to something within RemoteDB because instead of just exiting it drops into the debugger. I attached two screen shots when this error happens in the IDE. There are no background threads active created by my application, i disabled them all while tracking down the problem.

As I am short before delivery to the client, this caused a lot of panic here and we hope you can help us remove this problem.

I use sparkle and indy in parallel (Remote DB on Sparkle and Indy for the other https requests to the server) Do they collide?

Thanks in advance!


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,

After some researching, it seems that HookedRaiseException belongs to JEDI library?
Are you using JEDI library, and some sort of exception hooking mechanism from it?
If yes, I'd suggest you try to disable it and see if you are still getting the errors, or at least get more information about the error.

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. 

However, the problem is solved, I moved the query stuff to the server and query JSON from the background threads - this works well.