TMultiReadExclusiveWriteSynchronizer hangs
Original Reporter info from Mantis: JoshyFun @joshyfun
-
Reporter name: José Mejuto
Original Reporter info from Mantis: JoshyFun @joshyfun
- Reporter name: José Mejuto
Description:
If TMultiReadExclusiveWriteSynchronizer.EndWrite enters the IsMultiThread brach before using the same branch in .BeginWrite next call to BeginWrite hangs forever.
Steps to reproduce:
Discovered in a Lazarus program that stops to work after today SVN update (not updated since 20 days +/-). So the most simple way to reproduce is to create a very simple Lazarus Project with 2 forms. The first one with a button that instanciate the second one and in the "OnCreate" of Form1 sets IsMultiThreaded to True.
When you try to instanciate the second one a hang in TMultiReadExclusiveWriteSynchronizer happends.
Other simple code is:
procedure HangMe;
var
F: TMultiReadExclusiveWriteSynchronizer;
begin
F:=TMultiReadExclusiveWriteSynchronizer.Create;
F.Beginwrite;
IsMultiThread:=true; //Culprit.
F.Endwrite;
F.Beginwrite;
F.Endwrite;
F.Free;
end;
Additional information:
This seems to happend since the last changes to TMultiReadExclusiveWriteSynchronizer.
Mantis conversion info:
- Mantis ID: 15619
- OS: Windows
- OS Build: XP SP2
- Build: 14822
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 14830 (#13e8b3f2)