Bug 16813 - X.iOS throws ExecutionEngineException exception when using HttpClient with PCL library project
Summary: X.iOS throws ExecutionEngineException exception when using HttpClient with PC...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.5.x
Hardware: PC Mac OS
: --- normal
Target Milestone: 7.0.6
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-12-16 05:53 UTC by Prashant Cholachagudda
Modified: 2013-12-18 03:05 UTC (History)
3 users (show)

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


Attachments
Test case (3.93 MB, application/zip)
2013-12-16 05:53 UTC, Prashant Cholachagudda
Details


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:
Status:
VERIFIED FIXED

Description Prashant Cholachagudda 2013-12-16 05:53:14 UTC
Created attachment 5669 [details]
Test case

X.iOS throws ExecutionEngineException exception when using HttpClient within a PCL library project

System.ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) <Module>:invoke_void__this___HttpWebRequest_int (System.Net.HttpWebRequest,int)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

at System.Lightup.TryCall[HttpWebRequest,Int32] (System.Delegate& storage, System.Net.HttpWebRequest instance, System.String methodName, Int32 parameter) [0x00000] in <filename unknown>:0
at System.Lightup.TrySet[HttpWebRequest,Int32] (System.Delegate& storage, System.Net.HttpWebRequest instance, System.String propertyName, Int32 value) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequestLightup.TrySetTimeout (System.Net.HttpWebRequest instance, Int32 value) [0x00000] in <filename unknown>:0
at System.Net.Http.HttpWebRequest.set_Timeout (Int32 value) [0x00000] in <filename unknown>:0
at System.Net.Http.HttpClientHandler.SetDefaultOptions (System.Net.Http.HttpWebRequest webRequest) [0x00000] in <filename unknown>:0
at System.Net.Http.HttpClientHandler.CreateAndPrepareWebRequest (System.Net.Http.HttpRequestMessage request) [0x00000] in <filename unknown>:0
at System.Net.Http.HttpClientHandler.SendAsync (System.Net.Http.HttpRequestMessage request, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62
at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in <filename unknown>:0
at Shared.Strategies.WebClient+<DownloadString>d__0.MoveNext () [0x00035] in c:\Workspaces\r_burgess\TirOne\TIROne Mobile Application\Main\Shared\Strategies\WebClient.cs:25
Comment 1 Sebastien Pouliot 2013-12-17 10:43:26 UTC
Are you sure you're using 7.1.0 (as you specified for the version) ?

When reporting always include the XS version info, i.e. use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).

Also if there's more than one project inside a solution please state which one should be used. E.g. HttpIssue works fine for me.

I'll try HttpIssue.UI next - but we should not have to guess the steps to reproduce a bug.
Comment 2 Sebastien Pouliot 2013-12-17 10:46:35 UTC
HttpIssue.UI works fine too.
Comment 4 Sebastien Pouliot 2013-12-17 11:08:46 UTC
HttpIssue.UI works works fine with 7.1.1 (which should be identical, except extra API, to 7.0.6).

That likely means the issue is already fixed. QA will verify this with 7.0.6.
Comment 5 Atin 2013-12-18 03:05:29 UTC
I have verified this issue, below is verified steps:

1. Download and debug sample project and simulator.
2. Click on Button and observed that application is working fine and getting response from PCL project class.

Refer Screen shot: http://screencast.com/t/lvGeeTeUl

Check With:

All Mac
XS 4.2.3 (build 20)
X. iOS 7.0.6.164