[Lazarus] Mutlithreaded Dll Callback crashes my Application

Sven Barth pascaldragon at googlemail.com
Thu Aug 26 09:44:59 CEST 2010


Am 25.08.2010 23:07, schrieb José Mejuto:
>>> On the other hand, if Unix needs one thread creation then it should be
>>> automagically done in the initialization section of cthreads, do not ?
> SB>  This might indeed be a solution.
>
> If windows have the same problem, threading system should be
> initialized in... somewhere automagically as windows multithread is
> always present.
>

This only solves one point (but is needed nevertheless).

As I've showed in the last message to Alexander yesterday evening you 
need to initialize some things PER THREAD and I don't know whether this 
can be automised. We might need to ask the FPC devs for help regarding 
this. Perhaps the first time a threadvar in this new thread is accessed 
might be a good possibilty, but I don't know (yet) how we could track 
whether this is the first call, because threadvars are not yet allocated 
(hen-egg-problem). I'll have to take a deeper look into the threading 
system on Win32 :)

Regards,
Sven




More information about the Lazarus mailing list