[Mono-bugs] [Bug 657207] New: 2.8.1 regression: System.Drawing.Graphics destructor doesnt check for null before disposing maccontext
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Dec 2 14:09:42 EST 2010
https://bugzilla.novell.com/show_bug.cgi?id=657207
https://bugzilla.novell.com/show_bug.cgi?id=657207#c0
Summary: 2.8.1 regression: System.Drawing.Graphics destructor
doesnt check for null before disposing maccontext
Classification: Mono
Product: Mono: Class Libraries
Version: 2.8.x
Platform: Macintosh
OS/Version: Mac OS X 10.6
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Drawing.
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: brian at sooloos.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Blocker: ---
Description of Problem:
If I create a Graphics from a bitmap, Graphics.Dispose crashes when called.
This is new in 2.8.1--2.8 did not exhibit this problem.
Steps to reproduce the problem:
$ cat > t.cs
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
public class Foo {
public static void Main(string[] args) {
Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format24bppRgb);
using (Graphics g = Graphics.FromImage(bmp)) {
}
}
}
$ gmcs /r:System.Drawing t.cs
$ mono --debug t.exe
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at System.Drawing.Graphics.Dispose () [0x00025] in
/private/tmp/monobuild/build/BUILD/mono-2.8.1/mcs/class/System.Drawing/System.Drawing/Graphics.cs:300
at Foo.Main (System.String[] args) [0x00000] in <filename unknown>:0
--
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