[Mono-bugs] [Bug 485826] Constructing a Graphics object using FromHdc with a Memory DeviceContext causes crash. .NET difference

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 16 19:26:51 EDT 2009


User tom_hindle at sil.org added comment

--- Comment #1 from tom hindle <tom_hindle at sil.org>  2009-03-16 17:26:50 MST ---
Seems it not just an issue with Memory buffers:

The following program compiles and runs on .NET but crashes on mono

using System;
using System.Drawing;
using System.Windows.Forms;

public class MyForm : Form
    static void Main()
        Application.Run(new MyForm());

    protected override void OnPaint(PaintEventArgs e)

        // Get handle to device context.
        IntPtr hdc = e.Graphics.GetHdc();
        Graphics newGraphics = Graphics.FromHdc(hdc);
        Graphics newGraphics2 = Graphics.FromHdc(newGraphics.GetHdc());        


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