[Mono-bugs] [Bug 383878] New: Region.Complement makes error with some data

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 25 14:00:07 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=383878


           Summary: Region.Complement makes error with some data
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: i386
               URL: http://limada.sourceforge.net/Limaki/index.html
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lytico at users.sourceforge.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: Component Test


Region.Complement makes an error if you use negative or zero rectangle width
This error appears on linux, but not under windows. Tested on suse with mono
1.9 (vmware-image provided by novell)

The following code is an example how to reproduce the error:

void testRegion(){

    Region clipRegion = new Region();
    clipRegion.MakeInfinite();

    Rectangle smaller = new Rectangle(5, 5, -10, -10);
    Rectangle bigger = new Rectangle(-5, -5, 12, 12);

    clipRegion.Intersect(smaller);
    // this makes error in mono - linux, but not under Windows (xp):
    clipRegion.Complement(bigger);
}

you get something like this:

Stacktrace:

  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCombineRegionRectI
(intptr,System.Drawing.Rectangle&,System.Drawing.Drawing2D.CombineMode)
<0x00004>
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCombineRegionRectI
(intptr,System.Drawing.Rectangle&,System.Drawing.Drawing2D.CombineMode)
<0xffffffff>
  at System.Drawing.Region.Complement (System.Drawing.Rectangle) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/System.Drawing/System.Drawing/Region.cs:164
  at (wrapper remoting-invoke-with-check) System.Drawing.Region.Complement
(System.Drawing.Rectangle) <0xffffffff>
  at MonoWinformTests.TestControlA.RegionTest () [0x00033] in
/home/linux/Desktop/MonoWinform/TestControlA.cs:83


-- 
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