[Mono-bugs] [Bug 59000][Maj] New - Exception occurs compiling simple form with Mono 0.91

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 24 May 2004 20:07:43 -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 kingdurin@yahoo.com.

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

--- shadow/59000	2004-05-24 20:07:43.000000000 -0400
+++ shadow/59000.tmp.13858	2004-05-24 20:07:43.000000000 -0400
@@ -0,0 +1,201 @@
+Bug#: 59000
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: Windows XP Version 2002
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kingdurin@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Exception occurs compiling simple form with Mono 0.91
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+E:\Documents and Settings\Administrator\My Documents\Visual Studio 
+Projects\Heroes 4 Affinity>mcs Form1.cs -r:E:\Progra~1\Mon
+o-0.91\lib\mono\1.0\System.Windows.Forms.dll,E:\Progra~1\Mono-0.91
+\lib\mono\1.0\System.Drawing.dll
+syntax error, got token `ERROR', expecting ABSTRACT AS EXTERN INTERNAL IS 
+NEW OPERATOR OVERRIDE PRIVATE PROTECTED PUBLIC READ
+ONLY SEALED STATIC THIS UNSAFE VIRTUAL VOLATILE OPEN_BRACE CLOSE_BRACE 
+OPEN_BRACKET CLOSE_BRACKET OPEN_PARENS CLOSE_PARENS DO
+T COMMA COLON SEMICOLON OP_LT OP_GT BITWISE_AND BITWISE_OR STAR CARRET 
+INTERR OP_LE OP_GE OP_EQ OP_NE OP_AND OP_OR IDENTIFIER
+
+Mono.CSharp.yyParser.yyException: irrecoverable syntax error
+in <0x007f3> Mono.CSharp.CSharpParser:yyparse 
+(Mono.CSharp.yyParser.yyInput)
+in <0x00070> Mono.CSharp.CSharpParser:parse ()
+
+E:\Progra~1\Mono-0.91\lib\mono\1.0\System.Drawing.dll(1) error CS8025: 
+Parsing error
+Compilation failed: 1 error(s), 0 warnings
+
+E:\Documents and Settings\Administrator\My Documents\Visual Studio 
+Projects\Heroes 4 Affinity>type Form1.cs
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+using System.Threading;
+using System.Diagnostics;
+
+namespace Heroes_4_Affinity
+{
+        /// <summary>
+        /// Summary description for Form1.
+        /// </summary>
+        public class frmMain : System.Windows.Forms.Form
+        {
+                private System.Windows.Forms.Button cmdSetAffinity;
+                /// <summary>
+                /// Required designer variable.
+                /// </summary>
+                private System.ComponentModel.Container components = null;
+
+                public frmMain()
+                {
+                        //
+                        // Required for Windows Form Designer support
+                        //
+                        InitializeComponent();
+
+                        //
+                        // TODO: Add any constructor code after 
+InitializeComponent call
+                        //
+                }
+
+                /// <summary>
+                /// Clean up any resources being used.
+                /// </summary>
+                protected override void Dispose( bool disposing )
+                {
+                        if( disposing )
+                        {
+                                if (components != null)
+                                {
+                                        components.Dispose();
+                                }
+                        }
+                        base.Dispose( disposing );
+                }
+
+                #region Windows Form Designer generated code
+                /// <summary>
+                /// Required method for Designer support - do not modify
+                /// the contents of this method with the code editor.
+                /// </summary>
+                private void InitializeComponent()
+                {
+                        this.cmdSetAffinity = new 
+System.Windows.Forms.Button();
+                        this.SuspendLayout();
+                        //
+                        // cmdSetAffinity
+                        //
+                        this.cmdSetAffinity.Dock = 
+System.Windows.Forms.DockStyle.Fill;
+                        this.cmdSetAffinity.Name = "cmdSetAffinity";
+                        this.cmdSetAffinity.Size = new System.Drawing.Size
+(240, 45);
+                        this.cmdSetAffinity.TabIndex = 0;
+                        this.cmdSetAffinity.Text = "Set Affinity";
+                        this.cmdSetAffinity.Click += new 
+System.EventHandler(this.cmdSetAffinity_Click);
+                        //
+                        // frmMain
+                        //
+                        this.AutoScaleBaseSize = new System.Drawing.Size
+(5, 13);
+                        this.ClientSize = new System.Drawing.Size(240, 45);
+                        this.Controls.AddRange(new 
+System.Windows.Forms.Control[] {
+
+          this.cmdSetAffinity});
+                        this.FormBorderStyle = 
+System.Windows.Forms.FormBorderStyle.FixedDialog;
+                        this.MaximizeBox = false;
+                        this.MinimizeBox = false;
+                        this.Name = "frmMain";
+                        this.ShowInTaskbar = false;
+                        this.SizeGripStyle = 
+System.Windows.Forms.SizeGripStyle.Hide;
+                        this.Text = "Hereos 4 Affinity Tool.";
+                        this.ResumeLayout(false);
+
+                }
+                #endregion
+
+                /// <summary>
+                /// The main entry point for the application.
+                /// </summary>
+                [STAThread]
+                static void Main()
+                {
+                        Application.Run(new frmMain());
+                }
+
+                private void cmdSetAffinity_Click(object sender, 
+System.EventArgs e)
+                {
+                        bool blnFound = false;
+                        bool blnWasRunning = false;
+                        this.Hide();
+                        Process[] processes;
+                        while(true)
+                        {
+                                blnFound = false;
+                                processes = Process.GetProcesses();
+                                foreach (Process instance in processes)
+                                {
+                                        if(instance.ProcessName=="heroes4")
+                                        {
+                                                if(!blnWasRunning)
+                                                {
+                                                        
+instance.ProcessorAffinity=(IntPtr)0x0001;
+                                                }
+
+                                                blnFound = true;
+                                        }
+                                }
+
+                                blnWasRunning = blnFound;
+
+                                Thread.Sleep(30000);
+                        }
+
+                }
+        }
+}
+
+E:\Documents and Settings\Administrator\My Documents\Visual Studio 
+Projects\Heroes 4 Affinity>
+
+
+Steps to reproduce the problem:
+1. Compile using the above code
+2. 
+3. 
+
+Actual Results:
+See the error
+
+Expected Results:
+Successfully compiles and runs on Microsoft .Net Framework SDK 1.0 SP2
+
+How often does this happen? 
+Every time.
+
+Additional Information: