[fpc-pascal] unexpected termination with no errors
pascaldragon at googlemail.com
Wed May 15 17:11:54 CEST 2019
Karoly Balogh (Charlie/SGR) <charlie at scenergy.dfmk.hu> schrieb am Mi., 15.
Mai 2019, 15:25:
> On Wed, 15 May 2019, James Richters wrote:
> > Has anyone encountered anything like this before or know how I can make
> > sure I always get the maximum amount of debugging info when my program
> > crashes?
> Is it a subthreaded app?
> The only case when I noticed something similar (under Linux though), when
> a certain subthread throws an exception, it just silently disappears
> without any further handling. It doesn't throw any exception, unless you
> wrap the entire Execute method in a try-except.
> (Sidenote: I've been pondering for a while if I should report this as a
> bug. I think the RTL should put a try-except around there, to show a
> stacktrace on unhandled exceptions, just like the main thread dying does,
> but who knows which Delphi de-facto standard behavior would that violate,
> so meh...)
That is already the case at least for TThread descendants as can be seen in
rtl/unix/tthread.inc, ThreadFunc. This is needed for the FatalException
One could argue whether the BeginThread API should protect the function as
well though... 🤷♀️
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal