[Mono-osx] GetProcesses() and NullReferenceException

Janek Priimann janek.priimann at gmail.com
Mon Nov 3 15:11:09 EST 2008


A NullReferenceException is thrown every time I call Process.GetProcesses()
on my computer (OS X 10.5.5). Am I missing something obvious here?

Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object
  at System.Diagnostics.Process.GetProcesses () [0x0002d] in
/private/tmp/monobuild/build/BUILD/mono-2.0.1/mcs/class/System/System.Diagnostics/Process.cs:853
  at Test.Main () [0x00000]

mono -V
Mono JIT compiler version 2.0.1 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
	TLS:           normal
	GC:            Included Boehm (with typed GC)
	SIGSEGV:       normal
	Notification:  Thread + polling
	Architecture:  x86
	Disabled:      none

----

Code example:

using System.Diagnostics;

public class Test
{
	static public void Main()
	{
		Process.GetProcesses();
	}
 
	public Test()
	{
	}
}

-- 
View this message in context: http://www.nabble.com/GetProcesses%28%29-and-NullReferenceException-tp20293224p20293224.html
Sent from the Mono - OSX mailing list archive at Nabble.com.



More information about the Mono-osx mailing list