[Mono-bugs] [Bug 499630] New: NullReferenceException when constructing PageSetupDialog
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Apr 30 00:55:19 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=499630
Summary: NullReferenceException when constructing
PageSetupDialog
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: dhgbayne at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Description of Problem:
When I attempt to construct a PageSetupDialog, the constructor throws a
NullReferenceException.
Steps to reproduce the problem:
1. Compile the following code using either Microsoft CSC 8.00.50727.3053 ("csc
test.cs") or Mono CSC 2.0.1.0 ("csc test.cs -reference:System.Windows.Forms"):
using System;
using System.Windows.Forms;
internal sealed class Program
{
[STAThread]
private static void Main(string[] args)
{
new PageSetupDialog();
}
}
2. Run the resultant executable with Mono 2.4 on MacOS 10.4, on a Mac Pro.
Actual Results:
I see the following exception:
Unhandled Exception: System.NullReferenceException: Object reference not
set to an instance of an object
at System.Windows.Forms.PageSetupDialog.get_UseYardPound () [0x00000]
at System.Windows.Forms.PageSetupDialog.LocalizedLengthUnit () [0x00000]
at System.Windows.Forms.PageSetupDialog.InitializeComponent () [0x00000]
at System.Windows.Forms.PageSetupDialog..ctor () [0x00000]
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.PageSetupDialog:.ctor ()
at Program.Main (System.String[] args) [0x00000]
Expected Results:
I expect to see silent success; the application should construct the
PageSetupDialog and then exit. I see the expected behaviour using Microsoft
NET v2.0.50727 on Windows Vista SP1, and Mono 2.0.1 on Ubuntu 9.04 (i386).
How often does this happen?
Every time.
Additional Information:
The only workaround I've found is to catch the exception & then disable
printing in the UI. Not pretty, or a decent solution long-term.
--
Configure bugmail: http://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