In a small test program, exception handling works, in the main thread, with BeginThread as well as with pthread_create. In the big program, it doesn't. So the mystery still to solve, is why ....

Maybe this is related to <https://gitlab.com/freepascal.org/fpc/source/-/issues/12974> as the code resides in a dynamic library (written in Pascal and called into from a main program, also written in Pascal)

Just as decribed in <https://gitlab.com/freepascal.org/fpc/source/-/issues/12974> the exception is handled by FPC in this case

  try
   SysUtils.RaiseLastOSError;
  except;
    writeln( 'handled adriaan`s crash exception')
  end;

but not in this case

  try
    theInt := pinteger(1234)^ }
  except;
    writeln( 'handled adriaan`s crash exception')
  end;

So, this does seem related, although on another platform.

Regards,

Adriaan van Os

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

Reply via email to