[Mono-bugs] [Bug 77438][Nor] Changed - Crash on GdipFillRectangleI

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Mar 18 12:19:23 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77438

--- shadow/77438	2006-03-17 16:41:44.000000000 -0500
+++ shadow/77438.tmp.30395	2006-03-18 12:19:23.000000000 -0500
@@ -110,6 +110,23 @@
 This happens because we're accessing memory that has been freed.
 
 Commenting the line GdipFree(dest) on line 551 of image.c make it
 "works" but leak in (most) other conditions. 'allocate' is probably
 mis-updated somewhere.
 
+
+------- Additional Comments From sebastien at ximian.com  2006-03-18 12:19 -------
+The 'allocated' flag is fine. However we seem to supply a reference to
+the memory to Cairo (and then free it). So Cairo isn't happy when we
+ask it to fill the rectangle.
+
+This seems to happen when calling
+   gdip_bitmap_ensure_surface 
+   (around line 530 in image.c)
+which will use the temporary memory memory, then it calls
+   pattern = cairo_pattern_create_for_surface(image->surface);
+   (around line 535 in image.c)
+which makes cairo reference that memory block
+
+I'm not sure what would be the best way to fix it. Maybe keeping this
+memory (extra field in bitmap) until we dispose of the bitmap ?
+


More information about the mono-bugs mailing list