Bug 31208 - Another AOT error (MT3001)
Summary: Another AOT error (MT3001)
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.10
Hardware: Other Other
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2015-06-17 19:13 UTC by Herman Schoenfeld
Modified: 2015-09-03 15:41 UTC (History)
3 users (show)

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

Build log (282.50 KB, application/octet-stream)
2015-06-17 19:21 UTC, Herman Schoenfeld
Build log with -v -v -v -v (378.18 KB, application/octet-stream)
2015-06-23 01:45 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-06-17 19:13:33 UTC
After upgrading to latest stable Xamarin release (, previous DLL's which were being linked fine are now failing with error MT3001: Could not AOT the assembly.

I've provided the "mtouch-cache" folder so you can reproduce the issue. 

My guess is the linker is failing on empty interface declarations.

Version information below.

=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: aad8e2c1-53aa-4766-af0b-57b0ba105a0e
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/Developer/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Mac OS X 10.10.3
Darwin 192-168-1-7.tpgi.com.au 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 2 Herman Schoenfeld 2015-06-17 19:21:27 UTC
Created attachment 11656 [details]
Build log
Comment 3 Herman Schoenfeld 2015-06-23 01:45:49 UTC
Created attachment 11711 [details]
Build log with -v -v -v -v
Comment 4 Herman Schoenfeld 2015-06-23 01:46:41 UTC
Please note this is a very serious issue for us now since our Apple distribution license has expired and we cannot recompile the app. It's totally down for everyone at the moment.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-06-23 03:02:45 UTC
If a previous version of Xamarin.iOS worked, you can download it from your Xamarin Store account (https://kb.xamarin.com/customer/portal/articles/1699777-how-do-i-downgrade-to-an-older-version-) and use it until we fix this bug.
Comment 6 Sebastien Pouliot 2015-06-23 11:15:52 UTC
The recent MT3001 errors comes from additional checks done by the AOT compiler [1]. 

That spotted a bug in the linker where an assembly could be invalid (e.g. peverify would not be happy) but that did not affect most application (it never was reported before). 

However that new check nows prevent a successful build. As such it's being, temporarily, disabled for 8.10.2.x. You can download it from [2], it's identical to the beta being released today - but it also removes the check.

[1] the check is new in XI 8.10.1.x, going back to 8.10.0.x should be fine (or the issue is different) using https://kb.xamarin.com/customer/portal/articles/1699777-how-do-i-downgrade-to-an-older-version

[2] http://storage.bos.internalx.com/macios-mac-macios-cycle5-c5sr2/ef/ef8c2f7734c2f1702dec51766aff1de1bed1c5db/monotouch-
Comment 7 Herman Schoenfeld 2015-06-23 19:32:45 UTC
Can you please advise which stable build and ETA this will be permanently fixed in for future maintenance purposes?
Comment 8 Herman Schoenfeld 2015-06-23 20:33:41 UTC
Tried [2] but error still occured and also got about 11 other code-based errors which were never there before (related to Newtonsoft.JSON.dll and use of JObject).

Tried downgrading to but AOT MT3001 error persisted (same stacktrace different dll).

Now am downgrading to and will see.
Comment 9 Herman Schoenfeld 2015-06-23 21:09:55 UTC didnt work either. Same error. Downgrading to 8.9 now.
Comment 10 Sebastien Pouliot 2015-06-23 21:30:33 UTC
Sorry. An MT3001 means the AOT compiler did not produce an output file (and the real cause vary and the stack trace is always identical as it comes from `mtouch` not the AOT compiler). Your build log contained the following line:

> 		Error setting up IGraph`1 class vtable

which can only happen in 8.10.1.x (and 8.10.2 build before the one I linked). That's the error that was removed from the new build [2] I linked earlier.

However it might not have been the only error - otherwise it would have been fixed (like other reports). Build logs can be difficult to read since all AOT compilation process are done in parallel (and that makes the logs hard to decipher).

It would be useful if you could attach another build log (either with [2] or with 8.10.0.x or earlier) so we can compare them.

Right now the simplest workaround is to use the previous version of XI that was used to build your application.
Comment 11 Sebastien Pouliot 2015-09-03 15:41:03 UTC
Beside the workaround in the 8.10 service releases the root cause is also fixed in XI 8.99 previews.