Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When presented with a matrix that can't be inverted, MS .net Matrix.Invert() seems to silently ignore that error. Mono libgdiplus throws an exception.
See https://bugs.launchpad.net/purple-pen/+bug/580619, the program in question runs happily on Windows. Mono says:
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
at System.Drawing.Drawing2D.Matrix.Invert () [0x00000]
Patching the program to not Invert() the matrix unless IsInvertible() removes the exception on Mono as well, but should not be required..
Seen with Ubuntu Oneiric packaged libgdiplus-2.10-2
The following code throws an ArgumentException on Windows: https://dotnetfiddle.net/R7ym4P
public class Program
public static void Main()
var matrix = new Matrix(123, 24, 82, 16, 47, 30);
I think this issue can be closed as both Windows and Mono have the same behaviour.