[Mono-bugs] [Bug 420139] New: NRE at WindowsFormsSynchronizationContext::cctor()

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 25 14:25:43 EDT 2008


           Summary: NRE at WindowsFormsSynchronizationContext::cctor()
           Product: Mono: Class Libraries
           Version: 1.9
          Platform: i686
        OS/Version: Windows Server 2008
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: themann at indyfantasysports.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Description of Problem:
  Static constructor of WindowsFormsSynchronizationContext throws a
NullReferenceException (WindowsFormsSynchronizationContext appears to be
accessed by Control constructor, thus invoking the static constructor).

Steps to reproduce the problem:
1. Invoke Control Constructor, e.g.:
namespace MonoTest {
        static class Program {
                static void Main() {
                        Application.Run(new Form());

2. Execute application using Mono

Actual Results:
Application throws TypeInitializationException, with an inner exception of

Expected Results:
Application should display a blank window

How often does this happen? 
Every execution

Additional Information:
This has only been experienced on Windows Server 2008

Exception output:
Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for
System.Windows.Forms.WindowsFormsSynchronizationContext --->
System.NullReferenceException: Object reference not set to an instance of an
at (wrapper native-to-managed)
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00000>
at (wrapper managed-to-native)
at System.Windows.Forms.XplatUIWin32.CreateWindow
(System.Windows.Forms.CreateParams) <0x0039f>
at System.Windows.Forms.XplatUI.CreateWindow
(System.Windows.Forms.CreateParams) <0x00015>
at System.Windows.Forms.NativeWindow.CreateHandle
(System.Windows.Forms.CreateParams) <0x00037>
at System.Windows.Forms.Control.CreateHandle () <0x00076>
at System.Windows.Forms.Control.CreateControl () <0x0005d>
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control.CreateControl () <0x00036>
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () <0x0002f>
--- End of inner exception stack trace ---

  at System.Windows.Forms.Control..ctor () [0x00000]
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000]
  at System.Windows.Forms.ContainerControl..ctor () [0x00000]
  at System.Windows.Forms.Form..ctor () [0x00000]
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:.ctor ()
  at MonoTest.Program.Main () [0x00000]

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list