Bug 27116 - [iOS] Attempting to JIT compile method '(wrapper unknown) System.Net.NetworkInformation.MacOsStructs.sockaddr_in:PtrToStructure (intptr,object)' while running with --aot-only.
Summary: [iOS] Attempting to JIT compile method '(wrapper unknown) System.Net.NetworkI...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-02-16 19:11 UTC by Kent Green [MSFT]
Modified: 2016-05-26 21:32 UTC (History)
4 users (show)

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

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:
RESOLVED NORESPONSE

Description Kent Green [MSFT] 2015-02-16 19:11:33 UTC
---Overview---
From this desk case:
https://xamarin.desk.com/agent/case/124650

Customer reports that one of their users in the field hit a crash with the following exception reported via Insights: 
> Attempting to JIT compile method '(wrapper unknown) System.Net.NetworkInformation.MacOsStructs.sockaddr_in:PtrToStructure (intptr,object)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

---Stack Trace---
> at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
> at System.Net.NetworkInformation.MacOsNetworkInterface.ImplGetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
> at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
> at VantageIT.Net.VantageNetwork.GetIPAddress () [0x00000] in <filename unknown>:0
> at VantageIT.ACR.SalesTALK.VantageDiagnostics.GetDiagnosticReport (Boolean includeHTMLandBodyTags) [0x00000] in <filename unknown>:0
> at VantageIT.Errors.VantageErrorLog+<LogErrorWithVantageSupportDesk>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
> at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0

---Code Snippet---
Customer reports the following segment is what tripped it:
> var nix = (from nic in NetworkInterface.GetAllNetworkInterfaces()
> where nic.Id.StartsWith("en") //wireless or lan for emulator
> || nic.Id.StartsWith("pdp_ip")
> select nic
> );

---Additional Info---
Pinged #iOS to ask for their opinion, they said to go ahead and file this issue; and to ask the customer if the issue happens regularly / predictably; and about their generic value type sharing settings. Asking the customer for more info on those.
Comment 1 Sebastien Pouliot 2015-02-19 19:14:13 UTC
I added the above code snippet into our test suite (maccore/master b53952a9b7e0c9c6f3d2fe8ede42f43282850fa0) maybe our bots will be able to duplicate it sometime (if it's random) but it worked fine for me.

> Asking the customer for more info on those.

^ NEEDINFO :)
Comment 2 Sebastien Pouliot 2016-05-26 21:32:13 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!