[fpc-pascal] CheckSynchronize

Vincent Snijders vsnijders at quicknet.nl
Mon Jun 18 19:48:49 CEST 2007


Hi,

I was investigating the lazarus bug report http://www.freepascal.org/mantis/view.php?id=9068.

It is caused by the following sequence of events (... eventually calls):
Synchronize(@MyMessage)

In the MainThread:
ProcessMessages
CheckSynchronize
...
MyMessage
...
AForm.ShowModal
...
ProcessMessage
CheckSynchronize
...
MyMessage
...
AForm.ShowModal
Error: trying to call showmodal on visible form.

Is it our fault that we call CheckSynchronize nested (i.e. indirectly from a synchronized method) or is a CheckSynchronize not smart enough not to call the synchronized method (i.e MyMessage) twice, even if Synchronize is called only once for this method. If the latter, I will create a fpc bug report without the LCL example code.

Vincent



More information about the fpc-pascal mailing list