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.
I have tested using Moq and NSubstitute (both of which use Castle.Core). When mocking generic methods, Mono 4.x crashes with a SIGABRT. The same code runs fine under Mono 3.x.
To reproduce, use a Castle.Core mocking library such as Moq or NSubstitute to mock an interface's generic function, as in the following gist: https://gist.github.com/rudism/497970d4d189af9857c2
Result: The code compiles and runs as expected in Mono 3.x. In Mono 4.x, it compiles fine but running it produces the following crash report:
* Assertion at sgen-alloc.c:460, condition `*p == NULL' not met
at <unknown> <0xffffffff>
at Castle.Proxies.IMockMeProxy.HelloWorld<T> () <IL 0x00052, 0x00147>
at MoqTest.MainClass.Main (string) [0x00057] in /source/MoqTest/MoqTest/Program.cs:17
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00060, 0xffffffff>
Debug info from gdb:
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
My mono 4 test machine on which I reproduced this error is running CentOS 7 with the following output from mono --version:
Mono JIT compiler version 4.0.1 (tarball Wed Apr 29 08:44:01 BST 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
This problem seems to have resurfaced with the update of Mono version 184.108.40.206
This is a real problem for us. We've upgraded some of our solutions to produce .NETStandard libraries, which require mono 5.4 on the build machine. However, we're hitting this bug with existing solutions that run unit tests using Castle.Core via mono. I've tried installing mono 5.2 alongside 5.4, but this breaks the .NETStandard builds.
Any ideas when this will be fixed?
I'm seeing the problem with 220.127.116.11 used by Xamarin version 15.4
It worked with the previous Xamarin release using Mono 5.2.
FWIW we were able to get our Xamarin builds running again by using Mono 5.2.
This quite a big problem for us on Mac OS. We really need to get this fixed since we soon need to convert our projects to .Net Standard too since most plugins out there are moving to .Net Standard at a rapid pace.
Rolling back to Mono 5.2 worked, but we really need a fix for this.
Same issue for our team. All our unit tests that make use of Moq (and thus Castle.Core) are now failing on 15.4. Downgrading to 15.3/Mono 5.2 is not an option for us as we need .NET Standard support provided by 15.4/Mono5.4. Any feedback from Xamarin?
Could you please provide a repro case so we can run it locally? Thank you.
We've verified Mono 18.104.22.168 fixes this for our Xamarin unit tests using Moq.
Marking as resolved per response in https://bugzilla.xamarin.com/show_bug.cgi?id=29953#c8. Please reopen if you can reproduce. Thank you!
Confirmed Mono 22.214.171.124 solved our Moq issues aswell. Thanks.