[Mono-bugs] [Bug 33455][Wis] New - Bug in mcs

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
7 Nov 2002 20:26:23 -0000


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 raciel@es.gnu.org.

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

--- shadow/33455	Thu Nov  7 15:26:23 2002
+++ shadow/33455.tmp.10628	Thu Nov  7 15:26:23 2002
@@ -0,0 +1,143 @@
+Bug#: 33455
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: raciel@es.gnu.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bug in mcs
+
+I have the following errors with mcs with a GTK# ruler example that I am doing:
+
+
+raciel@voyager:~/cvs/mono/gtk-sharp/sample/tutorial/radiobuttons/rulers$ make
+mcs /unsafe -r glib-sharp.dll -r gtk-sharp.dll -r gdk-sharp.dll -r
+System.Drawing.dll rulers.cs
+
+** (process:6219): WARNING **: unhandled exception System.Exception:
+"Should not happen I think"
+in <0x00030> Mono.CSharp.EventExpr:Emit (Mono.CSharp.EmitContext)
+in <0x0008e> Mono.CSharp.NewDelegate:Emit (Mono.CSharp.EmitContext)
+in <0x0017a> Mono.CSharp.Argument:Emit (Mono.CSharp.EmitContext)
+in <0x00287> Mono.CSharp.Invocation:EmitArguments
+(Mono.CSharp.EmitContext,System.Reflection.MethodBase,System.Collections.ArrayList)
+in <0x003bc> Mono.CSharp.Invocation:EmitCall
+(Mono.CSharp.EmitContext,bool,bool,Mono.CSharp.Expression,System.Reflection.MethodBase,System.Collections.ArrayList,Mono.CSharp.Location)
+in <0x00122> Mono.CSharp.EventExpr:EmitAddOrRemove
+(Mono.CSharp.EmitContext,Mono.CSharp.Expression)
+in <0x00090> Mono.CSharp.Assign:Emit (Mono.CSharp.EmitContext,bool)
+in <0x00015> Mono.CSharp.Assign:EmitStatement (Mono.CSharp.EmitContext)
+in <0x00086> Mono.CSharp.StatementExpression:Emit (Mono.CSharp.EmitContext)
+in <0x0026f> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x000af> Mono.CSharp.EmitContext:EmitTopBlock
+(Mono.CSharp.Block,Mono.CSharp.Location)
+in <0x004fc> Mono.CSharp.MethodData:Emit
+(Mono.CSharp.TypeContainer,Mono.CSharp.Block,object)
+in <0x0001f> Mono.CSharp.Method:Emit (Mono.CSharp.TypeContainer)
+in <0x00284> Mono.CSharp.TypeContainer:Emit ()
+in <0x004e3> Mono.CSharp.RootContext:EmitCode ()
+in <0x00753> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000b> Mono.CSharp.Driver:Main (string[])
+
+make: *** [all] Error 255
+
+The code is: 
+// label.cs - Gtk# Tutorial example
+//
+// Author: Alejandro Sánchez Acosta <raciel@es.gnu.org>
+// 	   Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
+//
+// (c) 2002 Alejandro Sánchez Acosta
+
+namespace GtkSharpTutorial {
+
+	using Gtk;
+	using GtkSharp;
+	using Gdk;
+	using GdkSharp;
+	using System;
+	using System.Drawing;
+
+	public class ruler
+	{
+
+		static void delete_event (object obj, DeleteEventArgs args)
+		{
+			Application.Quit();
+		}
+
+		static void exitbutton_event (object obj, EventArgs args)
+		{
+			Application.Quit();
+		}
+
+		public static void Main(string[] args)
+		{
+		
+			Gtk.Window window;
+			Table table;
+			DrawingArea area;
+			HRuler hrule;
+			VRuler vrule;
+			
+			Application.Init();   
+   			window = new Gtk.Window ("Ruler sample");
+ 
+			window.DeleteEvent += new DeleteEventHandler (delete_event);
+
+			window.BorderWidth  = 10;
+			
+			table = new Table (3, 2, false);
+			window.Add(table);
+
+			area = new DrawingArea ();
+			
+			area.SetSizeRequest(600,400);
+
+			table.Attach (area, 1, 2, 1, 2, AttachOptions.Expand|AttachOptions.Fill,
+AttachOptions.Fill, 0, 0);
+
+			area.Events = EventMask.PointerMotionMask | EventMask.PointerMotionHintMask;
+
+			hrule = new HRuler();
+			hrule.Metric = MetricType.Pixels;
+			hrule.SetRange (7, 13, 0, 20);
+
+			area.MotionNotifyEvent += new MotionNotifyEventHandler
+(hrule.MotionNotifyEvent);
+
+			table.Attach(hrule, 1, 2, 0,1,
+AttachOptions.Expand|AttachOptions.Shrink|AttachOptions.Fill,
+AttachOptions.Fill, 0, 0);
+
+			vrule = new VRuler();
+			vrule.Metric = MetricType.Pixels;
+			vrule.SetRange (0, 400, 10, 400);
+
+			area.MotionNotifyEvent += new MotionNotifyEventHandler
+(vrule.MotionNotifyEvent);
+
+			table.Attach(vrule, 0, 1, 1, 2, AttachOptions.Fill,
+AttachOptions.Expand|AttachOptions.Shrink|AttachOptions.Fill, 0, 0);
+
+			area.Show();
+			hrule.Show();
+			vrule.Show();
+			table.Show();
+			window.Show();
+
+			Application.Run();
+		}
+	}
+}
+
+I have the last Debian packages installed.