[Mono-dev] bugs from svn code
Carlos Solorzano
carlos at applianz.com
Mon Nov 21 14:21:40 EST 2005
Whenever there is a problem with code on SVN do I submit a bug report or
just an email on the development list?
I have two bugs so far:
First is log4net doesn't display the class name correctly anymore, it
used to do it fine all the way till 1.1.9.2
For example it says:
DEBUG 20051121 00:00:32: ?
And before it used to have the namespace.ClassName.MethodName()
Second, I am getting an exception on the ID property of the Process
class right after launching a process, and I have never gotten that
before on the same exact code:
Unhandled Exception: System.InvalidOperationException: Process ID has
not been set.
in <0x0005a> System.Diagnostics.Process:get_Id ()
in (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_Id ()
in <0x000ff> Proc.Class1:Run ()
The code for that second bug is below, and it launches 30 xcalcs but you
dont even need to launch that many, I was trying to test a previous bug
I had found on the process class:
using System;
using System.Diagnostics;
using System.Threading;
namespace Proc
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
for (int i =0; i < 30; i++)
{
Thread thread = new Thread(new ThreadStart(Run));
thread.IsBackground = true;
thread.Start();
}
Console.ReadLine();
Console.WriteLine("Exiting");
}
private static void Run()
{
ProcessStartInfo info = new ProcessStartInfo("xcalc");
Process p = new Process();
p.StartInfo = info;
p.EnableRaisingEvents = true;
p.Exited +=new EventHandler(p_Exited);
p.Start();
while(true)
{
Console.WriteLine(DateTime.Now +":"+
Process.GetProcessById(p.Id).HasExited);
Thread.Sleep(20);
}
}
private static void p_Exited(object sender, EventArgs e)
{
Console.WriteLine(sender + ":"+e);
}
}
}
More information about the Mono-devel-list
mailing list