In Manos.IO.Managed/Context.cs, bad synchronization?
blucz opened this issue · comments
Brian Luczkiewicz commented
This is happening on windows with ms.net 4.0 with 78f3d16
the 'outstanding' queue is protected by lock(syncRoot) in some places and lock(this) in other places.
Occasionally, I get a crash like this:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Manos.IO.Managed.Context.RunOnceNonblocking() in c:\sooloos\sooloos\Cola\Manos\src\Manos.IO\Manos.IO.Managed\Context.cs:line 124
at Manos.IO.Managed.Context.RunOnce() in c:\sooloos\sooloos\Cola\Manos\src\Manos.IO\Manos.IO.Managed\Context.cs:line 107
at Manos.IO.Managed.Context.Start() in c:\sooloos\sooloos\Cola\Manos\src\Manos.IO\Manos.IO.Managed\Context.cs:line 100
Changing all of the locks to reference syncRoot seems to fix the problem.