https://bugzilla.novell.com/show_bug.cgi?id=463285
Summary: Probable JIT bug Product: Mono: Runtime Version: SVN Platform: IA64 OS/Version: UNIX Other Status: NEW Severity: Normal Priority: P5 - None Component: JIT AssignedTo: lu...@novell.com ReportedBy: spi...@gmail.com QAContact: mono-bugs@lists.ximian.com Found By: --- Description of Problem: A Delegate is invoked when it shouldn't if the method is simple enough. Steps to reproduce the problem: 1. Place in a file: public class A { private int _output = 0; private int _error = 0; public static void Main(string[] args) { System.Diagnostics.Process process = new System.Diagnostics.Process(); process.StartInfo.FileName = "ls"; process.StartInfo.CreateNoWindow = true; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; try { process.Start(); A aux = new A(); process.OutputDataReceived += aux.OutputReceived; process.ErrorDataReceived += aux.ErrorReceived; process.BeginOutputReadLine(); process.BeginErrorReadLine(); process.WaitForExit(); process.CancelErrorRead(); process.CancelOutputRead(); System.Console.WriteLine("Ouput " + aux._output); System.Console.WriteLine("Error " + aux._error); } finally { process.Close(); } } private void OutputReceived(object sender, System.Diagnostics.DataReceivedEventArgs args) { _output++; } private void ErrorReceived(object sender, System.Diagnostics.DataReceivedEventArgs args) { /*foreach(char a in args.Data) System.Console.WriteLine(a);*/ _error++; } } 2. Compile it and run it. Actual Results: Error value is 1. Expected Results: Error value should be 0. How often does this happen? Always, except if I add more code to the method as the one inside the comment. Additional Information: -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs