I have a weird issue whereby my server crashes with an APPCRASH error when close the application. This is when running it as a standalone app rather than a service and only within the Delphi IDE. I’ve done some testing and oddly, this only happens if I’ve actually performed some data access. If I simply start the server and close it immediately then all is well but if I start it and open and close a data table, then the crash occurs when I close the application.
I’m not sure if this is somehow related to threads. I’ve noticed that, the first time I open a data table, quite a few threads are created and remain active. I presume this is normal. Is it possible that some of these threads are not terminating properly when the application closes?
I’m clutching at straws here and wondering if anyone has any ideas on how I can debug this error as there’s virtually no information and I don’t seem to be able to trap it at all.
Any help appreciated.