"Object reference not set to an instance of an object" - .NET Framework 4

Description

PC: Windows 7 Ultimate
Virtual Machine: Windows XP Professional SP3

Hi,

I am trying to run an application that was developed using the .NET Framework 4. When I run it I receive the error "Object reference not set to an instance of an object" along with a detailed error log.

When I run this on my native OS I do not receive the error, and I have exactly the same versions of the .NET Framework installed.

After receiving advice from several sources they pointed out it's most likely the Virtual Machine software, i.e. Virtualbox.

The error log I get is:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

Exception Text
System.NullReferenceException: Object reference not set to an instance of an object.
at A.R.Z()
at A.R.CB(Object A, EventArgs B)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

JIT Debugging
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.