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 following classes:
public class Car
public Car ()
public async Task<string> GetEngineName()
public int GetAge()
public class Ford:Car
public Ford ():base()
public async new Task<string> GetEngineName()
int engineAge = this.GetAge ();//value returned is 5 as it should
int engineAgeBase = base.GetAge (); // value returned is 0-wrong!
string engineName= await base.GetEngineName();//here it crashes
When I call:
Ford ford=new Ford();
There are 2 bugs(probably related):
1.engineAgeBase has value=0 and should have 5, also to notice that all variables initialized in ctor lost its values when is called base.Method(), it's very wired seems like 'this' and 'base' are 2 different instances.
2.When it is called string engineName= await base.GetEngineName(); it crashes with:
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Just FYI: this is just a simplified example, example has no meaning, but this issue occur in real scenario(I'm trying to port a lib from .NET/WP/WinStore on Xamarin and I got that issues)
I tried pasting your code into a test project and it ran fine for me.
Can you create a complete test project that fails for you? The project settings can sometimes be significant, and in addition ensures we're doing the exact same thing as you are.
Created attachment 5671 [details]
Just start app and press: Get Async
Just press 'Get Async' and you will see the crash.
If you put break points in Xamarin Studio you will see that base.GetAge() returns 0.
Just as extra info: I'm using latest stable version of Xamarin.iOS, Xamarin.Android and Xamarin Studio and running it on OSX 10.8.5
It's compiler issue the generated code is not strictly valid
any idea if the fix will come on Stable version or Alpha/Beta first? I'm not aware of your flow and would be very important for me to know where should I expect the fix.
The fix will show up in mono release made after the commit which resolves the issue lands in master.
Fixed in master
I just update the to the version below, and my code that was working started to crash.
Version 4.2.4 (build 35)
Installation UUID: ae226d65-a362-4c5d-a9b1-26f389a71bb8
Mono 3.2.6 ((no/9b58377)
GTK+ 2.24.23 (Raleigh theme)
Package version: 302060000
Apple Developer Tools
Xcode 5.1.1 (5085)
Xamarin.Mac: Not Installed
Version: 22.214.171.124 (Business Edition)
Build date: 2014-04-18 15:39:16-0400
Version: 4.12.3 (Business Edition)
Android SDK: /Users/takenet/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Release ID: 402040035
Git revision: 1173cb1c45bc56cb702e82cd21a7c9d0cea4acbf
Build date: 2014-04-17 13:45:52-04
Xamarin addins: 53bde0041263928e8bd64686f5ca5a8e4338dd76
Mac OS X 10.9.2
Darwin MacBook-Pro-de-Takenet.local 13.1.0 Darwin Kernel Version 13.1.0
Wed Apr 2 23:52:02 PDT 2014
I removed the base method, had to copy and paste it on a lot of classes, and them the crash stop.
Probably this version got a BUG regression.
@Guilherme: can you try installing the latest Mono alpha (3.4.0)?