Bug 28961 - AOT error when upgrading to Unified API
Summary: AOT error when upgrading to Unified API
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.10
Hardware: Other Other
: Normal normal
Target Milestone: 8.10.2 (C5SR2)
Assignee: Zoltan Varga
: 29256 29980 30158 30459 ()
Depends on:
Reported: 2015-04-09 23:38 UTC by Herman Schoenfeld
Modified: 2015-06-23 17:54 UTC (History)
9 users (show)

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

Build log (121.65 KB, text/plain)
2015-04-09 23:38 UTC, Herman Schoenfeld
OS X Environment Details (1.25 KB, text/plain)
2015-04-09 23:38 UTC, Herman Schoenfeld
Win Environment Details (4.90 KB, text/plain)
2015-04-09 23:39 UTC, Herman Schoenfeld

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 Herman Schoenfeld 2015-04-09 23:38:05 UTC
Created attachment 10704 [details]
Build log

After finding a work-around current bug 28918, I've encountered another show-stopper:

MTOUCH: Error MT3001: Could not AOT the assembly '/Users/Developer/Documents/Development/SH2/SH2.Mobile.iOS/obj/iPhone/Debug/mtouch-cache/Build/Sphere10.Framework.iOS.dll' (MT3001) (SH2)

Note: The Sphere10.* DLL's are compiled on a Windows machine with XI 8.10. The SH2.* DLL's are compiled on an OS X Machine with XI 8.10.

Attachments include:
1. Build Log
2. mtouch-cache folder for issue reproduction
3. Mac Environment Details
4. Win Environment Details
Comment 1 Herman Schoenfeld 2015-04-09 23:38:44 UTC
Created attachment 10705 [details]
OS X Environment Details
Comment 2 Herman Schoenfeld 2015-04-09 23:39:08 UTC
Created attachment 10706 [details]
Win Environment Details
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-04-10 06:20:00 UTC
What was the workaround for bug #28918?
Comment 6 Zoltan Varga 2015-04-10 10:49:46 UTC
A workaround is to make the methods referenced by the error messages manually synchronized, i.e. instead of using the [MethodImplAttribute(MethodImplOptions.Synchronized)] attribute,
Sphere10.Framework.TypeInfo.IsArray () should look like:

lock (typeof (TypeInfo)) {
  <rest of method>
Comment 7 Zoltan Varga 2015-04-10 10:53:31 UTC
The relevant methods are all in the Sphere10.Framework.TypeInfo class.
Comment 8 Zoltan Varga 2015-04-10 11:12:35 UTC
Fixed in mono master 2a96a023512a937dd16ca23ef6f3ff2b62ab3560.
Comment 9 Herman Schoenfeld 2015-04-14 21:11:03 UTC
Thank you for your prompt response, work-arounds implemented.
Comment 10 Rolf Bjarne Kvinge [MSFT] 2015-04-23 07:27:18 UTC
*** Bug 29256 has been marked as a duplicate of this bug. ***
Comment 11 Rolf Bjarne Kvinge [MSFT] 2015-05-12 13:17:46 UTC
*** Bug 29980 has been marked as a duplicate of this bug. ***
Comment 12 Sadik Ali 2015-05-18 06:56:14 UTC
I have checked this issue and able to reproduce the above given behavior with the help of sample given in the bug 29980. I am using following builds:
XS: Version 5.9.1 (build 4)

I have checked this issue with the master builds and there is no any error occurred. Application is getting deploy on device/simulator without any error.I am using following builds:
XS: 6.0 (build 650)

Screencast: http://www.screencast.com/t/xvg6t3oE6Ak

Hence I am closing this issue.
Comment 13 Rolf Bjarne Kvinge [MSFT] 2015-05-19 07:11:20 UTC
*** Bug 30158 has been marked as a duplicate of this bug. ***
Comment 14 Rolf Bjarne Kvinge [MSFT] 2015-05-27 04:51:22 UTC
*** Bug 30459 has been marked as a duplicate of this bug. ***