[Mono-bugs] [Bug 363881] New: Creating a new Rectangle from a PictureBox location and size produces an Invalid Parameter exception
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Feb 21 20:18:57 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=363881
Summary: Creating a new Rectangle from a PictureBox location and
size produces an Invalid Parameter exception
Product: Mono: Class Libraries
Version: 1.9.0
Platform: i686
OS/Version: openSUSE 10.3
Status: NEW
Severity: Normal
Priority: P5 - None
Component: libgdiplus
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: davidcanar at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Trying to create a new Rectangle from a PictureBox location and size produces
an Invalid Parameter exception. Calling this line:
Rectangle rec = new Rectangle(this.pictureBox1.Location,
this.pictureBox1.Size);
Throws this exception:
Unhandled Exception: System.ArgumentException: A null reference or invalid
value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x0009d] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs:219
at System.Drawing.Bitmap.SetPixel (Int32 x, Int32 y, Color color) [0x0003f]
in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/System.Drawing/System.Drawing/Bitmap.cs:179
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:SetPixel
(int,int,System.Drawing.Color)
at System.Drawing.Graphics.CopyFromScreenX11 (Int32 sourceX, Int32 sourceY,
Int32 destinationX, Int32 destinationY, Size blockRegionSize,
CopyPixelOperation copyPixelOperation) [0x001ab] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/System.Drawing/System.Drawing/Graphics.cs:262
at System.Drawing.Graphics.CopyFromScreen (Int32 sourceX, Int32 sourceY,
Int32 destinationX, Int32 destinationY, Size blockRegionSize,
CopyPixelOperation copyPixelOperation) [0x00045] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/System.Drawing/System.Drawing/Graphics.cs:190
at System.Drawing.Graphics.CopyFromScreen (Int32 sourceX, Int32 sourceY,
Int32 destinationX, Int32 destinationY, Size blockRegionSize) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/System.Drawing/System.Drawing/Graphics.cs:179
at (wrapper remoting-invoke-with-check)
System.Drawing.Graphics:CopyFromScreen (int,int,int,int,System.Drawing.Size)
at ScreenShot.Form1.GetScreenRegion (Rectangle rec) [0x0001b] in
/home/david/191076_ScreenShot/Form1.cs:83
at ScreenShot.Form1.btnCapture_Click (System.Object sender, System.EventArgs
e) [0x0001d] in /home/david/191076_ScreenShot/Form1.cs:45
at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x0001c]
in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs:962
at System.Windows.Forms.ToolStripButton.OnClick (System.EventArgs e)
[0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs:178
at System.Windows.Forms.ToolStripItem.HandleClick (System.EventArgs e)
[0x0000c] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs:1749
at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e,
ToolStripItemEventType met) [0x0004e] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs:1720
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ToolStripItem:FireEvent
(System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
at System.Windows.Forms.ToolStrip.OnMouseUp
(System.Windows.Forms.MouseEventArgs mea) [0x00037] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs:952
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x0007f] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5407
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0017c] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5154
at System.Windows.Forms.ScrollableControl.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:797
at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m)
[0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs:1204
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:225
at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:206
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x0006a] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:188
at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:3266
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:576
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00359] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:849
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00014] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:635
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:623
at ScreenShot.Program.Main () [0x0000b] in
/home/david/191076_ScreenShot/Program.cs:17
--
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