Re: [fpc-pascal] AllocateThreadVars ?

2024-10-10 Thread Adriaan van Os via fpc-pascal
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 as the code r

Re: [fpc-pascal] AllocateThreadVars ?

2024-10-10 Thread Adriaan van Os via fpc-pascal
Sven Barth via fpc-pascal wrote: You already wrote that you might have found a different cause, but nevertheless to clarify: the RTL initialization for the thread (which includes AllocateThreadVars) should already be done transparently by the RTL through hooks provided by pthread. Yes, I fo

Re: [fpc-pascal] AllocateThreadVars ?

2024-10-10 Thread Adriaan van Os via fpc-pascal
Sven Barth via fpc-pascal wrote: Adriaan van Os via fpc-pascal > schrieb am Mi., 9. Okt. 2024, 16:44: I have a program on MacOS that calls CoreAudio which calls the application back in a so-called AURendererCallback in a separate (com.apple.au

Re: [fpc-pascal] AllocateThreadVars ?

2024-10-10 Thread Sven Barth via fpc-pascal
Adriaan van Os via fpc-pascal schrieb am Mi., 9. Okt. 2024, 16:44: > I have a program on MacOS that calls CoreAudio which calls the application > back in a so-called > AURendererCallback in a separate (com.apple.audio.IOThread.client) thread. > This is a pthread > created by the system software,

Re: [fpc-pascal] AllocateThreadVars ?

2024-10-10 Thread Adriaan van Os via fpc-pascal
Adriaan van Os wrote: In that thread, a FreePascal try except block doesn't catch an exception. A globally installed TExceptProc does. if I look in the RTL code, it looks like a thread created with BeginThread does some extra things, like calling SysAllocateThreadVars. A comment notes that exc