[Mono-bugs] [Bug 77824][Nor] Changed - im: crash when calling PaintEventArgs.Graphics.Transform in OnPaint()

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun May 21 16:29:18 EDT 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.


--- shadow/77824	2006-05-20 14:59:39.000000000 -0400
+++ shadow/77824.tmp.15132	2006-05-21 16:29:18.000000000 -0400
@@ -213,6 +213,28 @@
 GdipGetWorldTransform: assertion `graphics != NULL' failed
 ***** MonoTests.System.Windows.Forms.PaintEventArgsTest.Dispose_False
 ** (/home/matt/lib/mono/1.0/nunit-console.exe:24530): CRITICAL **: 
 GdipGetWorldTransform: assertion `graphics != NULL' failed
+------- Additional Comments From sebastien at ximian.com  2006-05-21 16:29 -------
+No it won't. You're seeing this because (about) half of libgdiplus use
+g_return_val_if_fail to handle errors (e.g. NULL checks). All those
+cases ends up writing a CRITICAL problem on the console before
+returning an error code (libgdiplus), which later is converted to an
+exception (System.Drawing.dll). 
+Now the unit tests have cases to check for those problems (e.g. supply
+NULL and check for the expected exception) and trigger the CRITICAL
+display (on purpose) - but this IS a success (from the test point of
+The reason you're seeing the errors now (and not a few days ago) is
+only because I just added the tests - and yes I added them because I
+was thinking they could be related to this bug (but no it's not related).
+Personally I dislike the g_return_val_if_fail calls - in part because
+they mess up the unit tests display, coverity has a hard time dealing
+with them (and reporting false alarms) and, in some case, introduced
+problem when dealing with errors (e.g. missing free). But removing
+them won't fix your problem (only the display ;-)

More information about the mono-bugs mailing list