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
Developer Community or GitHub 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.
Application crashes when using:
SqlDecimal MaxValue = new SqlDecimal(Decimal.MaxValue);
SqlDecimal MinValue = new SqlDecimal(Decimal.MinValue);
This works as expected in MonoTouch but crashes when using in Mono for Android (on Mono for Android 4.1).
This does not crash for me. Do you get any exceptions in the logcat?
The actual reason is that the debug.mono.trace system property was set:
adb shell setprop debug.mono.trace all
When everything is traced, Mono generates the OverflowException when tracing the SqlDecimal static constructor. Disable tracing entirely, or only trace application-related namespaces, and the OverflowException is avoided.
In short, this is a JIT bug.
However, as per discussions with vargaz, because we have a Real Debugger™, and because the code is crummy, this bug is unlikely to be fixed anytime soon. In short, Don't Do That™.