[Mono-bugs] [Bug 68323][Nor] New - race condition using IFormatProvider.GetFormat

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 14 Oct 2004 08:54:30 -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 gert.driesen@pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=68323

--- shadow/68323	2004-10-14 08:54:30.000000000 -0400
+++ shadow/68323.tmp.26989	2004-10-14 08:54:30.000000000 -0400
@@ -0,0 +1,81 @@
+Bug#: 68323
+Product: Mono: Runtime
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: race condition using IFormatProvider.GetFormat
+
+There seems to be a race condition when using IFormatProvider.GetFormat 
+in a both the default and a newly constructed appdomain.
+
+In the separate appdomain, the call to IFormatProvider.GetFormat seems to 
+return null.
+
+I've attached a small repro. Just build it using :
+
+$ mcs -r:System.Web.dll test.cs
+
+and run it
+
+$ mono test.exe
+
+and you'll get the following exception :
+
+Unhandled Exception: System.FormatException: Error parsing 442px
+
+Server stack trace: 
+in <0x003f7> System.Web.UI.WebControls.Unit:.ctor 
+(string,System.Globalization.CultureInfo,System.Web.UI.WebControls.UnitTyp
+e)
+in <0x00012> System.Web.UI.WebControls.Unit:.ctor 
+(string,System.Globalization.CultureInfo)
+in <0x00025> System.Web.UI.WebControls.Unit:Parse 
+(string,System.Globalization.CultureInfo)
+in <0x000dd> System.Web.UI.WebControls.UnitConverter:ConvertFrom 
+(System.ComponentModel.ITypeDescriptorContext,System.Globalization.Culture
+Info,object)
+in <0x00022> System.ComponentModel.TypeConverter:ConvertFrom (object)
+in <0x00026> Descriptor:Test ()
+in <0xc6b3dc6d> (wrapper managed-to-native) 
+System.Runtime.Remoting.RemotingServices:InternalExecute 
+(System.Reflection.MethodBase,object,object[],object[]&)
+in <0x00004> (wrapper managed-to-native) 
+System.Runtime.Remoting.RemotingServices:InternalExecute 
+(System.Reflection.MethodBase,object,object[],object[]&)
+in <0x0018f> 
+System.Runtime.Remoting.RemotingServices:InternalExecuteMessage 
+(System.MarshalByRefObject,System.Runtime.Remoting.Messaging.IMethodCallMe
+ssage)
+
+
+Exception rethrown at [0]: 
+ ---> System.NullReferenceException: Object reference not set to an 
+instance of an object
+in <0x0001d> System.Int32:FindSign 
+(int&,string,System.Globalization.NumberFormatInfo,bool&,bool&)
+in <0x003ec> System.Int32:Parse 
+(string,System.Globalization.NumberStyles,System.IFormatProvider,bool,int&
+)
+in <0x00021> System.Int32:Parse 
+(string,System.Globalization.NumberStyles,System.IFormatProvider)
+in <0x00010> System.Int32:Parse (string,System.IFormatProvider)
+in <0x00360> System.Web.UI.WebControls.Unit:.ctor 
+(string,System.Globalization.CultureInfo,System.Web.UI.WebControls.UnitTyp
+e)
+--- End of inner exception stack trace ---
+
+in <0xc6adc2f7> (wrapper remoting-invoke) Descriptor:Test ()
+in <0x00004> (wrapper remoting-invoke) Descriptor:Test ()
+in <0x0002c> (wrapper remoting-invoke-with-check) Descriptor:Test ()
+in <0x0021b> EntryPoint:Main ()