Karoly Balogh (Charlie/SGR) <char...@scenergy.dfmk.hu> schrieb am Mi., 15.
Mai 2019, 15:25:

> Hi,
>
> 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
field.

One could argue whether the BeginThread API should protect the function as
well though... 🤷‍♀️

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to