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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81740 --- shadow/81740 2007-05-26 06:11:10.000000000 -0400 +++ shadow/81740.tmp.15300 2007-05-26 06:11:10.000000000 -0400 @@ -0,0 +1,109 @@ +Bug#: 81740 +Product: Mono: Runtime +Version: 1.2 +OS: All +OS Details: all; ms Vista/Xp, Linux os +Status: NEW +Resolution: +Severity: +Priority: Blocker +Component: misc +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Summary: Bugs in the use of tailcalls and in the System.Threading.SynchronizationContext.Current + +Description of Problem: +I found the problem when I try to run an assembly writen with +VisualStudio2005 that use fslib of F# project. +There are at least a couple of problems : the first is with +System.Threading.SynchronizationContext.Current and the second is with +management of sequence of tail-recursive calls + +That problem can be found alse executing "CuncurrentLife" sample of F# +distribution (research.microsoft.com/projects/ilx/fsharp.aspx ) + +Steps to reproduce the problem: +1. mono scls_simulator +2. replace "client.fs" "worker.fs" with the "- x mono.fs" version +3. recompile +4. mono scls_simulator + +Actual Results: +without modifications i got + +Unhandled Exception: System.DivideByZeroException: Division by zero + at Client+Client..ctor () [0x00000] + at <StartupCode>.Client._main () [0x00000] + +this because mono do not initalise correctly the controls of winform + +If i modify the client.fs and worker.fs to force the initialise of these +fields (like the "- x mono" version of that 2 file), I got + +System.NullReferenceException: Object reference not set to an instance of +an obj ect at [EMAIL PROTECTED],Microsoft.FS +harp.Core.Unit]].Invoke (Microsoft.FSharp.Core.FastFunc`2 ) [0x00000] +at [EMAIL PROTECTED] (Microsoft.FSharp.Core.Unit _unit) [0x00000] +at [EMAIL PROTECTED] (Microsoft.FSharp.Core.FastFunc`2 +, System.String ) [0x00000] +at Microsoft.FSharp.Core.FastFunc`2[Microsoft.FSharp.Core.FastFunc`2[System.St +ring,System.String],System.String].InvokeFast2[String] +(Microsoft.FSharp.Core.Fa +stFunc`2 , Microsoft.FSharp.Core.FastFunc`2 , System.String ) [0x00000] +at Worker+Worker..ctor (Int32 step_number, Int32 graph_refresh_rate, Int32 dat +a_refresh_rate, System.String fileName) [0x00000] +at [EMAIL PROTECTED] (Microsoft.FSharp.Core.Unit _unit) [0x00000] +at [EMAIL PROTECTED] (System.EventArgs _arg18) [0x00000] +at [EMAIL PROTECTED] (System.Object sender, System.EventArgs e) +[0x00000] +at (wrapper delegate-invoke) +System.MulticastDelegate:invoke_void_object_Event Args +(object,System.EventArgs) +at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] +at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] +at System.Windows.Forms.ButtonBase.OnMouseUp +(System.Windows.Forms.MouseEventArgs mevent) [0x00000] +at System.Windows.Forms.Button.OnMouseUp +(System.Windows.Forms.MouseEventArgs e) [0x00000] +at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& +m)[0x00000] +at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) +[0x00000] +at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& +m) [0x00000] +at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) +[0x00000] +at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows. +Forms.Message& m) [0x00000] +at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Fo +rms.Message& m) [0x00000] +at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr +wParam, IntPtr lParam) [0x00000] + +This is (according to a reply of Don Syme - the autor of F# language) +beacuse "tailcalls are not taken correctly. This leads to problems with +implementing message processing via a sequence of tail-recursive calls" +like that is in worker.fs + +Expected Results: +The application runs well with MS .NET Framework 2.0 +(they run fine also without interface with client/worker architetture); +the problem is located in System.Threading.SynchronizationContext.Current + and in the management of tailcalls + +How often does this happen? +Always + +Additional Information: +I think that these bug is very important because they limit the portability +of F# code, that instead work well without a clinet/worker interface. +If you want more information do not esitate ti contact me at [EMAIL PROTECTED] + +Thanks a lot for the attention +Best regads + +Guido Scatena _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
