[Lazarus] Lazarus application crash. Is PostMessage thread safe?

Giuliano Colla giuliano.colla at fastwebnet.it
Wed Feb 10 10:47:08 CET 2016


Il 10/02/2016 00:22, Denis Kozlov ha scritto:
> You create a recursive scenario yourself by calling 
> Application.ProcessMessages inside of ShowError inside of HandleError 
> - which is the message handling procedure itself, which is triggered 
> by Application.ProcessMessages. 

That's what I had guessed, but having it confirmed makes me feel better.

Moreover my ShowError is not protected from recursion, because 
Application.ProcessMessages is called before incrementing ErrGet. 
Therefore in case of recursion, it will attempt to process again the 
same message.

I would appear that also Application.ProcessMessages is not protected 
against recursion, which is possibly a bug.

Thanks a lot,

Giuliano





More information about the Lazarus mailing list