[Mono-bugs] [Bug 61515][Wis] Changed - NullReference exception in WaitOne()
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 14 Jul 2004 01:02:12 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by michi@zeroc.com.
http://bugzilla.ximian.com/show_bug.cgi?id=61515
--- shadow/61515 2004-07-14 00:42:07.000000000 -0400
+++ shadow/61515.tmp.26247 2004-07-14 01:02:12.000000000 -0400
@@ -1,14 +1,14 @@
Bug#: 61515
Product: Mono: Runtime
Version: unspecified
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: michi@zeroc.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -34,6 +34,36 @@
IceInternal.BasicStream:getUserExceptionFactory (string)
in [0x00015] (at /home/michi/src/icecs/src/Ice/BasicStream.cs:1320)
IceInternal.BasicStream:throwException ()
The corresponding code is very simple, and runs fine with the .NET run
time. (It works fine when compiled with either Visual C# or mcs.)
+
+------- Additional Comments From michi@zeroc.com 2004-07-14 01:02 -------
+Sorry, incomplete report above, I hit return too soon by mistake...
+
+The code that causes the problem is absolutely trivial:
+
+ private static Mutex _exceptionFactoryMutex = new Mutex();
+
+ private UserExceptionFactory getUserExceptionFactory(string id)
+ {
+ _exceptionFactoryMutex.WaitOne();
+ factory = (UserExceptionFactory)_exceptionFactories[id];
+ _exceptionFactoryMutex.ReleaseMutex();
+
+ // ...
+
+ return factory;
+ }
+
+ private void setUserExceptionFactory(UserExceptionFactory f,
+string id)
+ {
+ _exceptionFactoryMutex.WaitOne();
+ _exceptionFactories[id] = f;
+ _exceptionFactoryMutex.ReleaseMutex();
+ }
+
+Cheers,
+
+Michi.