Your difference in memory layout.
The process is influenced by many subtle factors. First, in the debugger, the JIT generates a slightly different code (to host the debugger). Depending on your debugger’s settings, Visual Studio may also inject other code into your process (for example, .vshost.exe). The debugger can also affect the time and, in turn, can set the race conditions and / or change the memory allocation.
In short, by the time you close the application, you will get a [slightly or significantly] different memory structure. The same goes for the other host application.
But this is only one side of the story. The other side is a mistake in dbexpress. Or maybe some other module causes memory corruption in dbexpress data. In any case, dbexpress gains access to some random address.
And this address is simply located on an unallocated memory page in one case, but happens to be in a dedicated case in other cases (because the memory layout is different, remember?). And in the latter case, dbexpress simply reads the value from memory, does something with it, apparently satisfied with the result and exits gracefully.
This (along with unsurpassed race conditions) is a very common problem with immaturely written unmanaged code (which, as my experience shows, is very common when using Delphi).
Decision? Change the conditions. You can try another car. Or on the same machine, but under heavy load. Or download some more modules. Or don't download some modules that you usually do. Play with him.
Saying this, yours truly doesn’t go that way. He's just looking for a pin in a haystack, never ending, emotionally draining an adventure. In addition, you are highly likely to receive AV elsewhere (but due to the same underlying reason).
Another (and best) option is debug printing. That is, if you have the dbexpress source code (sorry, I am not familiar with it).
Otherwise, I would start with a very thorough review of the code for the Delphi component. And perhaps debugging will also be printed.
Good luck.