Bug 13669 - [Async] nested async/await JIT compile exception (possible duplicate)
Summary: [Async] nested async/await JIT compile exception (possible duplicate)
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.4.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2013-07-31 18:09 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-01-07 11:09 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Test case (899.91 KB, application/zip)
2013-07-31 18:09 UTC, Brendan Zagaeski (Xamarin Team, assistant)

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-07-31 18:09:39 UTC
Created attachment 4504 [details]
Test case

Possible duplicate of #13193 ?

Reported on behalf of a user:

## Steps to reproduce
1. Run attached example on device.
2. Press the button.

## Result
Attempting to JIT compile method 'ServiceStack.ServiceClient.Web.AsyncServiceClient:SendAsync<TestiPhone.LoginResponse> (string,string,object)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
Comment 1 Dylan 2013-07-31 19:25:24 UTC
Please see my ServiceStack fork that contains the new async methods here:

A work-around to the solution as identified by Brendan is to add the following line in the TouchUpInside event handler:
new AsyncServiceClient().SendAsync<LoginResponse>("", "", default(LoginResponse));

However this is not a suitable work around for a client library. Perhaps there is something that can be done as LoginResponse (as per attached example) is a reference type and shouldn't be a worse case scenario for the AOT compiler.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-07-31 19:43:49 UTC
Can you have a look at this, Zoltan?
Comment 3 Zoltan Varga 2013-07-31 20:28:17 UTC
This works for me with mono master, so its probably a dup of #13193.
Comment 4 Dylan 2013-08-01 03:58:21 UTC
Thanks for confirming Zoltan. I tried the latest Mono beta (3.2.1) and the issue still occurs there. Do you know when these fixes will be released?
Comment 5 Zoltan Varga 2015-01-07 11:09:40 UTC
This was fixed a long time ago.