Bug 26699 - MT3001Could not AOT the assembly with a CocosSharp project
Summary: MT3001Could not AOT the assembly with a CocosSharp project
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
: 27704 32362 ()
Depends on:
Blocks:
 
Reported: 2015-02-03 14:00 UTC by John Miller [MSFT]
Modified: 2016-05-26 21:37 UTC (History)
8 users (show)

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


Attachments
DLL Files (510.69 KB, application/zip)
2015-02-03 14:00 UTC, John Miller [MSFT]
Details
Build Output (283.73 KB, text/plain)
2015-02-03 14:01 UTC, John Miller [MSFT]
Details
Verbose ouput of StepCounter (111.44 KB, text/plain)
2015-05-26 14:09 UTC, Johan Högfeldt
Details
Build output with debug version of MT (114.41 KB, application/octet-stream)
2015-06-01 16:37 UTC, Johan Högfeldt
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:
RESOLVED FIXED

Description John Miller [MSFT] 2015-02-03 14:00:38 UTC
Created attachment 9624 [details]
DLL Files

**Overview:**

MTOUCHTASK: error MT3001: Could not AOT the assembly '/Volumes/Macintosh HD/Users/UserName/Projects/Projekt/Slalom/Project.iOS/obj/iPhone/Debug/mtouch-cache/Build/System.Xml.dll'
MTOUCHTASK: error MT3001: Could not AOT the assembly '/Volumes/Macintosh HD/Users/UserName/Projects/Projekt/Slalom/Project.iOS/obj/iPhone/Debug/mtouch-cache/Build/MonoGame.Framework.Net.dll'

**Steps to Reproduce:**

   Build the attached project for Device. 

**Actual Results:**

   MT3001 Could not AOT the assembly. 
   It seems the reported assembly was different between two customer builds. 

**Expected Results:**

   Successful Build.

**Build Date & Platform:**

Xamarin Studio
Version 5.7 (build 661)
Installation UUID: 331ef9f8-3442-4ac0-9e3f-de1c6743f3f6
Runtime:
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)

Package version: 312000068

Apple Developer Tools
Xcode 6.1.1 (6611)
Build 6A2008a

Xamarin.iOS
Version: 8.6.0.51 (Business Edition)
Hash: dfb682f
Branch: 
Build date: 2015-01-08 13:39:32-0500

Xamarin.Android
Version: 5.0.99.147 (Business Edition)
Android SDK: /Users/johanhogfeldt/Library/Developer/Xamarin/android-sdk-mac_x86/
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

Xamarin.Mac
Not Installed

Build Information
Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

Operating System
Mac OS X 10.10.0
Darwin MacBook-4.local 14.0.0 Darwin Kernel Version 14.0.0
Fri Sep 19 00:26:44 PDT 2014
root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

**Additional Information:**

   I could not reproduce this on my machine with the project. In an attempt to reproduce, I also got the .dlls that were reported in the customers error message (see attached). After referencing the .dlls I still could not reproduce this with the project. 

See attached build log from the customer having the issue.
Comment 1 John Miller [MSFT] 2015-02-03 14:01:30 UTC
Created attachment 9625 [details]
Build Output
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-02-04 09:47:23 UTC
I can't reproduce either.

Please zip up and attach the following directory (after a failed build attempt): /Users/johanhogfeldt/Desktop/Slalom/Slalom.iOS/obj/iPhone/Debug/mtouch-cache, this will make sure we test with the exact same assemblies.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-02-04 10:52:54 UTC
Unfortunately I still can't reproduce.

Johan,
* Do you have another machine you can try to see if it's something specific to a particular machine?
* If not, can you try using a different user account instead?
* Is it always the same assemblies that fail to AOT (System.Xml.dll and Lidgren.Network.dll), or does it vary?
* Can you monitor your memory usage to see if we're consuming all your memory (i.e. the AOT compiler could be running out of memory).
Comment 6 Johan Högfeldt 2015-02-04 15:06:45 UTC
I'll anwer the questions in the order they were asked:

* Yes, I tried on a MacMini with OSX Mavericks and everything worked
* I do not have any other account to try
* It seems that if I use "Link SDK assemblies" it is Lidgren.Network.dll and if I use "Link all assemblies" it is MonoGame.Framework.Net.dll
* The memory usage seems fine

There are two major things that differs on the system where it is not working:

* It has Yosemite instead of Mavericks
* It has two hard drives, where the project being built is on one and Xamarin Studio is on the other. Also there is a symlink on the system hard drive pointing to the "documents hard drive".
Comment 7 Rolf Bjarne Kvinge [MSFT] 2015-02-05 10:25:50 UTC
> * Yes, I tried on a MacMini with OSX Mavericks and everything worked
OK, that means it's something particular with the setup on one of your machines.

> * I do not have any other account to try
I meant with another local user account on your Mac (in System Preferences -> Users & Groups)

> There are two major things that differs on the system where it is not working:
> 
> * It has Yosemite instead of Mavericks

I just tried on Yosemite, so that's not it.

> * It has two hard drives, where the project being built is on one and Xamarin
> Studio is on the other. Also there is a symlink on the system hard drive
> pointing to the "documents hard drive".
Can you try copying your project to the system hard drive, and see if that makes a difference?
Comment 8 Johan Högfeldt 2015-05-26 04:41:11 UTC
Sorry for the long wait, but a paying customer had me putting this on the waiting list for a while. Now I have (a little late) started work on updating my apps on the AppStore to the Unified API and it seems this error is thrown on all my projects (none of these uses MonoGame so for those it is always System.Xml.dll that fails).

So, to pick up where we left:

- Copying the project does not help
Comment 9 Rolf Bjarne Kvinge [MSFT] 2015-05-26 05:43:23 UTC
Have you tried upgrading to the latest stable version?

Does it happen even with a new project from a template?
Comment 10 Johan Högfeldt 2015-05-26 06:33:20 UTC
Yes I have the latest stable version.

I tried creating a new Tabbed application and it built without problems. Then tried to download the Step Counter sample app - it did not build, but the error was with System.dll
Comment 11 Rolf Bjarne Kvinge [MSFT] 2015-05-26 06:49:52 UTC
Can you try  creating a new user account on your Mac (in System Preferences -> Users & Groups), and see if it works there?
Comment 12 Johan Högfeldt 2015-05-26 09:43:52 UTC
Tried a new user account, but the same error occurs. I've tried some different options though and it seems building with Debug->Simulator works, while building Release and/or for Device throws the error.
Comment 13 Rolf Bjarne Kvinge [MSFT] 2015-05-26 10:20:11 UTC
Has this machine ever been repaired (by Apple or other people)?
Comment 14 Johan Högfeldt 2015-05-26 11:20:24 UTC
Yes it has undergone a major repair because of water damage a few years ago where most of the internals where replaced.

I also have installed a second hard drive (SSD) instead of the optical drive, as briefly mentioned in one of the comments above. (don't know if it qualifies as repair...)
Comment 15 Sebastien Pouliot 2015-05-26 14:00:26 UTC
Hello Johan,

I'm quite sorry about your issue. That's not something we see commonly. Could you attach the full build log (with -v -v -v -v) you get for the "Step Counter" sample (or any smaller sample that can reproduce this) ? 

We'll double check it (and compare it to the original one) to see if anything stands out. If there's no additional details we'll send you a custom-build of the AOT compiler to help diagnose how it crash (and what's causing it). Thanks
Comment 16 Johan Högfeldt 2015-05-26 14:09:04 UTC
Created attachment 11339 [details]
Verbose ouput of StepCounter
Comment 17 Johan Högfeldt 2015-05-27 07:47:59 UTC
I have added the build output. The volume "Macintosh HD" is the old standard HD that I use for file storage. "Samsung HD" is my SSD system drive (not sure it is mentioned, but anyway)
Comment 18 Rolf Bjarne Kvinge [MSFT] 2015-05-27 09:04:51 UTC
@Johan, unfortunately the build output didn't shed much light.

I'll prepare an instrumented XI package, and see if we can track it down that way.
Comment 19 Rolf Bjarne Kvinge [MSFT] 2015-05-29 12:35:08 UTC
@Johan, I've privately sent a link to a build for you to try.
Comment 20 Johan Högfeldt 2015-06-01 16:37:55 UTC
Created attachment 11411 [details]
Build output with debug version of MT
Comment 21 Johan Högfeldt 2015-06-01 16:38:38 UTC
Sorry for the delay, but now I have uploaded a log using that build
Comment 22 Rolf Bjarne Kvinge [MSFT] 2015-06-02 05:48:37 UTC
Thanks; I've just sent a new build privately.
Comment 23 Johan Högfeldt 2015-06-03 09:38:00 UTC
It works like a charm! Thanks!
Comment 24 Rolf Bjarne Kvinge [MSFT] 2015-06-03 09:57:41 UTC
Perfect, I'll get this fixed in a build without debug spew and send that to you as well then.

Thanks!
Comment 27 Brendan Zagaeski (Xamarin Team, assistant) 2015-07-24 16:53:29 UTC
*** Bug 32362 has been marked as a duplicate of this bug. ***
Comment 28 Steave 2016-04-25 09:37:14 UTC
Hi, all facing critical bug kind with almost the same errors, can anyone help please. 

This is Highly critical. 

In advance thanks
Comment 29 Steave 2016-04-25 10:11:36 UTC
Hi all,  facing critical bug with the same errors, can anyone help please (bug 40667)

This is Highly critical.

In advance thanks.
Comment 30 Sebastien Pouliot 2016-05-26 21:37:19 UTC
*** Bug 27704 has been marked as a duplicate of this bug. ***