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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal