[Mono-bugs] [Bug 457110] New: Messagebox: NullReferenceException on Ctrl+C
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Dec 7 11:38:33 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=457110
Summary: Messagebox: NullReferenceException on Ctrl+C
Product: Mono: Class Libraries
Version: SVN
Platform: x86
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: kobruleht2 at hot.ee
QAContact: mono-bugs at lists.ximian.com
Found By: ---
To reproduce, run code, press Ctrl+C
Observed: NullReferenceException
Environment: compilet with VS2008SP1 for .NET 3.5
using System;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
public class Test
{
static void Main()
{
Application.ThreadException += Application_ThreadException;
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
static void Application_ThreadException(object sender,
ThreadExceptionEventArgs e)
{
MessageBox.Show("Press ctrl+c to copy " + DateTime.Now.ToString());
}
}
class MainForm : Form
{
public MainForm()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(MainForm));
toolStrip1 = new ToolStrip();
openToolStripButton = new ToolStripButton();
customerToolStripButton = new ToolStripButton();
itemToolStripButton = new ToolStripButton();
invoiceToolStripButton = new ToolStripButton();
mainMenuStrip1 = new MenuStrip();
File = new ToolStripMenuItem();
openToolStripMenuItem = new ToolStripMenuItem();
openToolStripMenuItem.Click += new
EventHandler(openToolStripMenuItem_Click);
toolStripSeparator2 = new ToolStripSeparator();
Dokument = new ToolStripMenuItem();
arveToolStripMenuItem = new ToolStripMenuItem();
WareHouse = new ToolStripMenuItem();
Personnel = new ToolStripMenuItem();
Payroll = new ToolStripMenuItem();
FixedAssets = new ToolStripMenuItem();
Supplies = new ToolStripMenuItem();
GeneralLedger = new ToolStripMenuItem();
Manufacturing = new ToolStripMenuItem();
PointOfSale = new ToolStripMenuItem();
CardTerminal = new ToolStripMenuItem();
Rent = new ToolStripMenuItem();
WayBill = new ToolStripMenuItem();
CustomerRelationManagement = new ToolStripMenuItem();
toolStripSeparator8 = new ToolStripSeparator();
NewUserToolStripMenuItem = new ToolStripMenuItem();
exitToolStripMenuItem = new ToolStripMenuItem();
toolStrip1.Items.AddRange(new ToolStripItem[] {
openToolStripButton,
customerToolStripButton,
itemToolStripButton,
invoiceToolStripButton});
toolStrip1.Location = new System.Drawing.Point(0, 24);
toolStrip1.Name = "toolStrip1";
toolStrip1.Size = new System.Drawing.Size(644, 25);
toolStrip1.TabIndex = 1;
toolStrip1.Text = "toolStrip1";
openToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
openToolStripButton.Name = "openToolStripButton";
openToolStripButton.Size = new System.Drawing.Size(23, 22);
openToolStripButton.Text = "&Open";
openToolStripButton.ToolTipText = "Open";
customerToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
customerToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
customerToolStripButton.Name = "customerToolStripButton";
customerToolStripButton.Size = new System.Drawing.Size(23, 22);
customerToolStripButton.Text = "toolStripButton2";
customerToolStripButton.ToolTipText = "Klient (Ctrl+K)";
itemToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
itemToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
itemToolStripButton.Name = "itemToolStripButton";
itemToolStripButton.Size = new System.Drawing.Size(23, 22);
itemToolStripButton.Text = "toolStripButton1";
itemToolStripButton.ToolTipText = "Artikkel (Ctrl+D)";
invoiceToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
invoiceToolStripButton.Name = "invoiceToolStripButton";
invoiceToolStripButton.Size = new System.Drawing.Size(23, 22);
invoiceToolStripButton.Text = "toolStripButton1";
invoiceToolStripButton.ToolTipText = "Arve (Ctrl+E)";
mainMenuStrip1.Items.AddRange(new ToolStripItem[] {
File
});
mainMenuStrip1.Location = new System.Drawing.Point(0, 0);
mainMenuStrip1.Name = "mainMenuStrip1";
mainMenuStrip1.Size = new System.Drawing.Size(644, 24);
mainMenuStrip1.TabIndex = 3;
mainMenuStrip1.Text = "menuStrip1";
File.DropDownItems.AddRange(new ToolStripItem[] {
openToolStripMenuItem,
toolStripSeparator2,
Dokument,
WareHouse,
Personnel,
Payroll,
FixedAssets,
Supplies,
GeneralLedger,
Manufacturing,
PointOfSale,
CardTerminal,
Rent,
WayBill,
CustomerRelationManagement,
toolStripSeparator8,
NewUserToolStripMenuItem,
exitToolStripMenuItem});
File.MergeAction = MergeAction.Insert;
File.MergeIndex = 1;
File.Name = "File";
File.Size = new System.Drawing.Size(35, 20);
File.Text = "&File";
openToolStripMenuItem.MergeIndex = 1;
openToolStripMenuItem.Name = "openToolStripMenuItem";
openToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
openToolStripMenuItem.Text = "Open";
toolStripSeparator2.MergeIndex = 2;
toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new System.Drawing.Size(193, 6);
Dokument.DropDownItems.AddRange(new ToolStripItem[] {
arveToolStripMenuItem
});
Dokument.MergeIndex = 3;
AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
BackgroundImageLayout = ImageLayout.Center;
ClientSize = new System.Drawing.Size(644, 396);
Controls.Add(toolStrip1);
Controls.Add(mainMenuStrip1);
IsMdiContainer = true;
KeyPreview = false;
MainMenuStrip = mainMenuStrip1;
Name = "MainForm";
}
void openToolStripMenuItem_Click(object sender, EventArgs e)
{
Form frm = new Childform();
frm.MdiParent = this;
frm.Show();
}
ToolStrip toolStrip1;
ToolStripButton openToolStripButton;
ToolStripButton invoiceToolStripButton;
MenuStrip mainMenuStrip1;
ToolStripMenuItem File;
ToolStripMenuItem openToolStripMenuItem;
ToolStripSeparator toolStripSeparator2;
ToolStripMenuItem exitToolStripMenuItem;
ToolStripMenuItem Dokument;
ToolStripMenuItem arveToolStripMenuItem;
ToolStripMenuItem WareHouse;
ToolStripMenuItem Personnel;
ToolStripMenuItem Payroll;
ToolStripMenuItem FixedAssets;
ToolStripMenuItem Supplies;
ToolStripMenuItem GeneralLedger;
ToolStripMenuItem Manufacturing;
ToolStripMenuItem PointOfSale;
ToolStripMenuItem CardTerminal;
ToolStripMenuItem Rent;
ToolStripMenuItem WayBill;
ToolStripMenuItem CustomerRelationManagement;
ToolStripSeparator toolStripSeparator8;
ToolStripMenuItem NewUserToolStripMenuItem;
ToolStripButton customerToolStripButton;
ToolStripButton itemToolStripButton;
}
class Childform : Form
{
protected override void OnLoad(EventArgs e)
{
GetStandardEntityType();
base.OnLoad(e);
}
public static void GetStandardEntityType()
{
Assembly asm = Assembly.GetEntryAssembly();
asm.GetType("Bad", true);
}
public Childform()
{
toolStrip1 = new ToolStrip();
addToolStripButton = new ToolStripButton();
printToolStripButton = new ToolStripButton();
filterToolStripButton = new ToolStripButton();
deleteToolStripButton = new ToolStripButton();
menuStrip1 = new MenuStrip();
fileToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator = new ToolStripSeparator();
printToolStripMenuItem = new ToolStripMenuItem();
editToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator3 = new ToolStripSeparator();
copyToolStripMenuItem = new ToolStripMenuItem();
toolStripSeparator4 = new ToolStripSeparator();
selectAllToolStripMenuItem = new ToolStripMenuItem();
toolsToolStripMenuItem = new ToolStripMenuItem();
addToolStripMenuItem = new ToolStripMenuItem();
deleteToolStripMenuItem = new ToolStripMenuItem();
filterToolStripMenuItem = new ToolStripMenuItem();
helpToolStripMenuItem = new ToolStripMenuItem();
searchToolStripMenuItem = new ToolStripMenuItem();
toolStrip1.SuspendLayout();
menuStrip1.SuspendLayout();
SuspendLayout();
toolStrip1.GripStyle = ToolStripGripStyle.Hidden;
toolStrip1.Items.AddRange(new ToolStripItem[] {
addToolStripButton,
printToolStripButton,
filterToolStripButton,
deleteToolStripButton});
toolStrip1.Location = new System.Drawing.Point(0, 0);
toolStrip1.Name = "toolStrip1";
toolStrip1.Size = new System.Drawing.Size(337, 25);
toolStrip1.TabIndex = 3;
toolStrip1.Text = "toolStrip1";
addToolStripButton.Name = "addToolStripButton";
addToolStripButton.Size = new System.Drawing.Size(45, 22);
addToolStripButton.Text = "Uus";
addToolStripButton.ToolTipText = "Lisa (Ctrl+N)";
printToolStripButton.Name = "printToolStripButton";
printToolStripButton.Size = new System.Drawing.Size(50, 22);
printToolStripButton.Text = "TrĆĀ¼ki";
printToolStripButton.ToolTipText = "Print (Ctrl+P)";
filterToolStripButton.Name = "filterToolStripButton";
filterToolStripButton.Size = new System.Drawing.Size(46, 22);
filterToolStripButton.Text = "Otsi";
filterToolStripButton.ToolTipText = "Otsingufilter (F11)";
deleteToolStripButton.Name = "deleteToolStripButton";
deleteToolStripButton.Size = new System.Drawing.Size(64, 22);
deleteToolStripButton.Text = "Kustuta";
deleteToolStripButton.ToolTipText = "Kustuta (Ctrl+T)";
menuStrip1.Items.AddRange(new ToolStripItem[] {
fileToolStripMenuItem,
editToolStripMenuItem,
toolsToolStripMenuItem,
helpToolStripMenuItem});
menuStrip1.Location = new System.Drawing.Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.RenderMode = ToolStripRenderMode.System;
menuStrip1.Size = new System.Drawing.Size(337, 24);
menuStrip1.TabIndex = 2;
menuStrip1.Text = "menuStrip1";
menuStrip1.Visible = false;
fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
toolStripSeparator,
printToolStripMenuItem});
fileToolStripMenuItem.MergeAction = MergeAction.MatchOnly;
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
fileToolStripMenuItem.Text = "&File";
toolStripSeparator.MergeAction = MergeAction.Insert;
toolStripSeparator.MergeIndex = 3;
toolStripSeparator.Name = "toolStripSeparator";
toolStripSeparator.Size = new System.Drawing.Size(149, 6);
printToolStripMenuItem.MergeAction = MergeAction.Insert;
printToolStripMenuItem.MergeIndex = 2;
printToolStripMenuItem.Name = "printToolStripMenuItem";
printToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control |
Keys.P)));
printToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
printToolStripMenuItem.Text = "&Print";
editToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
toolStripSeparator3,
copyToolStripMenuItem,
toolStripSeparator4,
selectAllToolStripMenuItem});
editToolStripMenuItem.MergeAction = MergeAction.Insert;
editToolStripMenuItem.MergeIndex = 1;
editToolStripMenuItem.Name = "editToolStripMenuItem";
editToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
editToolStripMenuItem.Text = "&Paranda";
toolStripSeparator3.Name = "toolStripSeparator3";
toolStripSeparator3.Size = new System.Drawing.Size(157, 6);
copyToolStripMenuItem.Name = "copyToolStripMenuItem";
copyToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | KeysC)));
copyToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
copyToolStripMenuItem.Text = "Kopeeri";
toolStripSeparator4.Name = "toolStripSeparator4";
toolStripSeparator4.Size = new System.Drawing.Size(157, 6);
selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
selectAllToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
selectAllToolStripMenuItem.Text = "Vali kĆĀµik";
toolsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
addToolStripMenuItem,
deleteToolStripMenuItem,
filterToolStripMenuItem});
toolsToolStripMenuItem.MergeAction = MergeAction.Insert;
toolsToolStripMenuItem.MergeIndex = 2;
toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
toolsToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
toolsToolStripMenuItem.Text = "&Tegevus";
addToolStripMenuItem.Name = "addToolStripMenuItem";
addToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | Keys.N)));
addToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
addToolStripMenuItem.Text = "Lisa";
deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
deleteToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control |
Keys.T)));
deleteToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
deleteToolStripMenuItem.Text = "Kustuta";
filterToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Silver;
filterToolStripMenuItem.Name = "filterToolStripMenuItem";
filterToolStripMenuItem.ShortcutKeys = Keys.F11;
filterToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
filterToolStripMenuItem.Text = "Tingimus";
helpToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
searchToolStripMenuItem});
helpToolStripMenuItem.MergeAction = MergeAction.MatchOnly;
helpToolStripMenuItem.Name = "helpToolStripMenuItem";
helpToolStripMenuItem.Size = new System.Drawing.Size(34, 20);
helpToolStripMenuItem.Text = "&Abi";
searchToolStripMenuItem.MergeAction = MergeAction.Insert;
searchToolStripMenuItem.MergeIndex = 1;
searchToolStripMenuItem.Name = "searchToolStripMenuItem";
searchToolStripMenuItem.ShortcutKeys = Keys.F1;
searchToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
searchToolStripMenuItem.Text = "&Otsi teemat";
AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
ClientSize = new System.Drawing.Size(337, 272);
Controls.Add(toolStrip1);
Controls.Add(menuStrip1);
}
public ToolStrip toolStrip1;
ToolStripButton addToolStripButton;
ToolStripButton printToolStripButton;
ToolStripButton filterToolStripButton;
ToolStripButton deleteToolStripButton;
MenuStrip menuStrip1;
ToolStripMenuItem fileToolStripMenuItem;
ToolStripSeparator toolStripSeparator;
ToolStripMenuItem printToolStripMenuItem;
ToolStripMenuItem editToolStripMenuItem;
ToolStripSeparator toolStripSeparator3;
ToolStripMenuItem copyToolStripMenuItem;
ToolStripSeparator toolStripSeparator4;
ToolStripMenuItem selectAllToolStripMenuItem;
ToolStripMenuItem toolsToolStripMenuItem;
ToolStripMenuItem addToolStripMenuItem;
ToolStripMenuItem deleteToolStripMenuItem;
ToolStripMenuItem filterToolStripMenuItem;
ToolStripMenuItem helpToolStripMenuItem;
ToolStripMenuItem searchToolStripMenuItem;
}
--
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