[fpc-devel] Suspicion about TThread.Synchronize

Sven Barth pascaldragon at googlemail.com
Sun Feb 4 21:23:00 CET 2018


On 04.02.2018 20:37, Martin wrote:
> On 04/02/2018 19:17, Sven Barth via fpc-devel wrote:
>> On 03.02.2018 17:39, Martin wrote:
>>> All based on win32
>>>
>>> Pretext:
>>> I have an issue with a crash in PopThreadQueueHead called by
>>> CheckSynchronize.  (3.0.2)
>>> It happens in the Lazarus IDE, but at a low percentage only. (And not
>>> yet in the debugger)
>>> I don't think the below is related, but I found it while looking around.
>> Do you happen to have the exact location of the crash?
>>
> 
> See below. It seems to be a timing issue. Happens only at startup of the
> IDE (sofar).
> 
> TApplication.HandleException Access violation
>   Stack trace:
>   $004AEF98 line 370 of ../objpas/classes/classes.inc
>   $004AF116 line 423 of ../objpas/classes/classes.inc
>   $00576A98 line 2012 of win32/win32callback.inc
>   $005783D9 line 2696 of win32/win32callback.inc
>   $7618FD92
>   $7618FE6A
>   $761901AD
>   $7619024B
>   $005796C1 line 407 of win32/win32object.inc
>   $00444007 line 1276 of include/application.inc
>   $00444562 line 1413 of include/application.inc
>   $0049B800 line 54 of include/interfacebase.inc
>   $0044451B line 1401 of include/application.inc

Would you please test whether my change in r38115 (applied to 3.0.2)
makes any difference? Calling RemoveQueuedEvents() with a thread, but no
method (which happens during a thread's destruction) was up to then a
way to corrupt the queue. (Well, it could still corrupt the queue if a
thread instance is freed while its blocked inside a Synchronize call,
but that is asking for a whole different sort of trouble anyway)

Regards,
Sven



More information about the fpc-devel mailing list