[mono-vb] MS.VB.Compilerservices

Rob.Tillie@Student.tUL.EDU Rob.Tillie@Student.tUL.EDU
Tue, 20 Jul 2004 21:18:47 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C46E8E.617B52E0
Content-Type: text/plain

Hey Jambunathan,

I solved the bug but I cannot reach bugzilla at the moment, could you plz
close it?

The problem was that 'createZeroForCompare' returned an integer for type
Boolean. But Boolean.CompareTo(integer) is not allowed (I tested this on
MS.NET). Now 'createZeroForCompare' returns a default Boolean (false).

Greetz,
-- Rob.

> -----Original Message-----
> From: Rob.Tillie@Student.tUL.EDU [mailto:Rob.Tillie@Student.tUL.EDU]
> Sent: Tuesday, July 20, 2004 8:14 PM
> To: kjambunathan@novell.com; mono-vb@lists.ximian.com
> Subject: RE: [mono-vb] MS.VB.Compilerservices
> 
> I'll take it...
> 
> Greetz,
> -- Rob.
> 
> > -----Original Message-----
> > From: Jambunathan Jambunathan [mailto:kjambunathan@novell.com]
> > Sent: Tuesday, July 20, 2004 8:09 AM
> > To: mono-vb@lists.ximian.com
> > Subject: Re: [mono-vb] MS.VB.Compilerservices
> >
> > On second thoughts ...
> > ObjTst typically gets generated for the If statements by MS's vbc.
> >
> > Here is a simple test case that reproduces the bug. Compile this
> > source
> > aginst vbc and execute the MS's exe against mono.
> >
> > Imports System
> > Module M
> > 	Sub Main
> > 		Dim B as Boolean = true
> > 		Dim O1 as Object = B
> > 		Dim O2 as Object = Nothing
> >
> > 		If O1 = O2 Then
> > 			Console.WriteLine("Equal")
> > 		Else
> > 			Console.WriteLine("Not Equal")
> > 		End If
> > 	End Sub
> > End Module
> >
> > I have opened a bug in bugzilla
> > http://bugzilla.ximian.com/show_bug.cgi?id=61749.
> > Btw, any takers for fixing this bug ? Joao, Rob  ...
> >
> > Could you please confirm that this is the scenario with you as well ?
> >
> >
> > Regards,
> > Jambunathan K.
> >
> >
> > >>> "Jambunathan Jambunathan" <kjambunathan@novell.com> 7/20/2004
> > 11:02:07 AM >>>
> > > Unfortunality, I cannot resolve where the problem starts in my code
> > > since there is not direct call the ObjectType :(
> >
> > Howabout doing a "mono --debug whatever.exe". That way you should be
> > able to catch the line numbers.
> >
> > Regards,
> > Jambunathan K.
> >
> >
> > >>> "Jochen Wezel" <jwezel@compumaster.de> 7/20/2004 12:53:15 AM >>>
> > Hi Jambunathan!
> >
> > Here is a small bug I can report today:
> >
> > Stack Trace: System.ArgumentException: Object is not a Boolean.
> > in <0x0007c> System.Boolean:CompareTo (object)
> > in <0x001b6> Microsoft.VisualBasic.CompilerServices.ObjectType:ObjTst
> > (object,object,bool)
> > in <0x000e4>
> > CompuMaster.camm.WebManager.WMSystem:InitializeEnvironment
> > ()
> >
> > Unfortunality, I cannot resolve where the problem starts in my code
> > since there is not direct call the ObjectType :(
> >
> > Thanks!
> >
> > Regards
> > Jochen
> >
> >
> > Here the complete error:
> >
> > Server error in '/' application
> >
> > ------------------------------------------------------------------------
> > --------
> >
> > Description: Error processing request.
> > Error Message: HTTP 500.
> >
> > Stack Trace: System.ArgumentException: Object is not a Boolean.
> > in <0x0007c> System.Boolean:CompareTo (object)
> > in <0x001b6> Microsoft.VisualBasic.CompilerServices.ObjectType:ObjTst
> > (object,object,bool)
> > in <0x000e4>
> > CompuMaster.camm.WebManager.WMSystem:InitializeEnvironment
> > ()
> > in <0x0001a>
> > CompuMaster.camm.WebManager.WMSystem:set_CurrentServerIdentString
> > (string)
> > in <0x000d7> ASP.cammWebManager_ascx:SetupAdditionalConfiguration ()
> > in <0x0000e> ASP.cammWebManager_ascx:LoadConfiguration ()
> > in <0x00026>
> > CompuMaster.camm.WebManager.Controls.cammWebManager:System_Init ()
> > in <0x0000e>
> > CompuMaster.camm.WebManager.Controls.cammWebManager:OnWebManagerInit
> > (object,System.EventArgs)
> > in <0x00069> (wrapper delegate-invoke)
> > System.MulticastDelegate:invoke_void_object_EventArgs
> > (object,System.EventArgs)
> > in <0x00086> System.Web.UI.Control:OnInit (System.EventArgs)
> > in <0x0003a> System.Web.UI.UserControl:OnInit (System.EventArgs)
> > in <0x00273> System.Web.UI.Control:InitRecursive
> > (System.Web.UI.Control)
> > in <0x00185> System.Web.UI.Control:InitRecursive
> > (System.Web.UI.Control)
> > in <0x00060> System.Web.UI.Page:InternalProcessRequest ()
> > in <0x000c2> System.Web.UI.Page:ProcessRequest
> > (System.Web.HttpContext)
> > in <0x00359> System.Web.HttpServerUtility:Execute
> > (string,System.IO.TextWriter,bool)
> > in <0x000bb> System.Web.HttpServerUtility:Transfer (string,bool)
> > in <0x00016> System.Web.HttpServerUtility:Transfer (string)
> > in <0x00028> ASP.index_aspx:__RenderTree
> > (System.Web.UI.HtmlTextWriter,System.Web.UI.Control)
> > in <0x00069> (wrapper delegate-invoke)
> > System.MulticastDelegate:invoke_void_HtmlTextWriter_Control
> > (System.Web.UI.HtmlTextWriter,System.Web.UI.Control)
> > in <0x00048> System.Web.UI.Control:RenderChildren
> > (System.Web.UI.HtmlTextWriter)
> > in <0x00011> System.Web.UI.Control:Render
> > (System.Web.UI.HtmlTextWriter)
> > in <0x0001c> System.Web.UI.Control:RenderControl
> > (System.Web.UI.HtmlTextWriter)
> > in <0x00429> System.Web.UI.Page:InternalProcessRequest ()
> > in <0x000c2> System.Web.UI.Page:ProcessRequest
> > (System.Web.HttpContext)
> > in <0x002f3> ExecuteHandlerState:Execute ()
> > in <0x00084> StateMachine:ExecuteState
> > (System.Web.HttpApplication/IStateHandler,bool&)
> >
> >
> > _______________________________________________
> > Mono-vb mailing list
> > Mono-vb@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-vb
> > _______________________________________________
> > Mono-vb mailing list
> > Mono-vb@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-vb
> > _______________________________________________
> > Mono-vb mailing list
> > Mono-vb@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-vb
> _______________________________________________
> Mono-vb mailing list
> Mono-vb@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb


------_=_NextPart_000_01C46E8E.617B52E0
Content-Type: application/octet-stream;
	name="MSVB_61749.patch"
Content-Disposition: attachment;
	filename="MSVB_61749.patch"

Index: class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/ObjectType.cs
===================================================================
RCS file: /mono/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/ObjectType.cs,v
retrieving revision 1.8
diff -u -r1.8 ObjectType.cs
--- class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/ObjectType.cs	24 Jun 2004 14:06:50 -0000	1.8
+++ class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/ObjectType.cs	20 Jul 2004 19:13:29 -0000
@@ -1686,7 +1688,7 @@
 		private static object createZeroForCompare(TypeCode tc) {
 			switch(tc) {
 				case TypeCode.Boolean:
-					return (int)0;
+					return false;
 				case TypeCode.Char:
 					return (char)0;
 				case TypeCode.Byte:

------_=_NextPart_000_01C46E8E.617B52E0--