xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.46k stars 511 forks source link

Getting the error MT3001: Could not AOT the assembly #4012

Closed sharmashiv closed 6 years ago

sharmashiv commented 6 years ago

/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/obj/iPhone/Debug/mtouch-cache/64/Build/OsmSharp.UI.dll' (MT3001) (XXX.iOS). This error occurred when trying to build for physical iOS device, but not for simulator.

VincentDondain commented 6 years ago

Hi, this sounds like it's the same issue as https://github.com/xamarin/xamarin-macios/issues/3199.

A fix was deployed for our 15.7 release (currently in alpha/beta see https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.10/#Issues_Fixed).

In any case please include your full build logs, crash reports (if any), test case (to reproduce) and all your version information.

To get full build logs just set the log verbosity to diagnostic at the following locations:

On Visual Studio Windows you also want to add -v -v -v -v to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting Properties. Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

The easiest way to get exact version information:

sharmashiv commented 6 years ago

BuildLog.txt screen shot 2018-05-01 at 5 07 22 am

Two cases in build(xamarin.ios):

1) When build option setting:

Linker behavior: Link All In that case application crash with this error message You MUST invoke LoadApplication () before calling base.FinishedLaunching ()

2) When build option setting:

Linker behavior: Link Framework SDKs Only I'm getting the error:

MT3001: Could not AOT the assembly.

/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/obj/iPhone/Debug/mtouch-cache/64/Build/OsmSharp.UI.dll' (MT3001) (XXX.iOS

https://docs.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#MT3001

sharmashiv commented 6 years ago

When build option setting: Linker behavior: Link All Carsh Log .txt

Xamarin_IDE_Log.txt

When build option setting: Linker behavior: Link Framework SDKs Only Build_Log.txt Xamarin_IDE_Log.txt

sharmashiv commented 6 years ago

@VincentDondain Any update, i am really frustrated with Xamarin development.

VincentDondain commented 6 years ago

I see * Assertion at /Users/builder/data/lanes/5909/f62de472/source/xamarin-macios/external/mono/mono/mini/aot-compiler.c:6320, condition 'p - buf < buf_size' not met in your mtouch logs that leads to a crash and no output from the AOT compiler and then the MT3001 error.

I'm trying to find if this is a known issue but in any case we'll need your version informations (see how to get that in my first comment) to confirm your environment.

I'd be great to have the OsmSharp.UI.dll too.

VincentDondain commented 6 years ago

I believe your issue is similar to https://github.com/mono/mono/issues/7637. Your version informations will help us know if you have that patch already or not.

alanjclark commented 6 years ago

User's IDE info (from the file labelled Xamarin_IDE_Log.txt)

=== Xamarin Studio Enterprise ===

Version 6.3 (build 864)
Installation UUID: ee200553-8134-4470-ac98-8d741586a121
Runtime:
    Mono 5.8.1.0 (2017-10/6bf3922f3fd) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 508010000

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Apple Developer Tools ===

Xcode 9.3 (14154)
Build 9E145

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Enterprise)
Android SDK: /Users/macmini01/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        5.1 (API level 22)
        6.0 (API level 23)
        7.0 (API level 24)
        7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 4.2.1.29 (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: 11.9.1.24 (Visual Studio Enterprise)
Hash: f62de472
Branch: xcode9.3
Build date: 2018-03-29 19:30:53-0400

=== Xamarin Inspector ===

Not Installed

=== Build Information ===

Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

=== Operating System ===

Mac OS X 10.13.4
Darwin BKMACMINI01s-Mac-mini.local 17.5.0 Darwin Kernel Version 17.5.0
    Mon Mar  5 22:24:32 PST 2018
    root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
VincentDondain commented 6 years ago

Ah ok, then yes we believe this was fixed in a later version of Xamarin.iOS. The mono issue I mentioned above has a 2017-12 (5.10.xx) milestone and that mono 2017-12 was bump with Xamarin.iOS 11.10.XX series.

@sharmashiv could you please try your test case with the beta version of Xamarin.iOS (currently 11.10.1.174) and let us know if you still get the MT3001 error.

Note: If you do still have an issue we'll need at least the faulty dll to investigate more.

sharmashiv commented 6 years ago

@VincentDondain @alanjclark Please share beta version URL.

alanjclark commented 6 years ago

@sharmashiv I did notice that your IDE is significantly out of date. Xamarin Studio is now Visual Studio for Mac (as part of its natural evolution). There has not been an update for Xamarin Studio in over a year.

The easiest way to get the Beta (and the method I would recommend by far) is to update to Visual Studio for Mac. There was a dialogue box prompting to update the IDE in the latest Xamarin Studio, but you may have suppressed this. You can use the link above.

In Visual Studio for Mac you can simply change the update channel in the IDE to Beta and download all the Beta components.

If you wish to continue with Xamarin Studio then please email me for a link (I would prefer not to publicly publish links to releases that will be legacy after the next release). However, please note that this is not a scenario we would be able to support given the age of the IDE you are using and the date the last update was published.

sharmashiv commented 6 years ago

@VincentDondain @alanjclark Thanks guys now its fixed partial.

Two cases in build(xamarin.ios):

Second option fixed but still first in Open case.

1. When build option setting: Linker behavior: Link All In that case application crash with this error message You MUST invoke LoadApplication () before calling base.FinishedLaunching ()

OutputLog.txt Update IDE Information.txt

**2. When build option setting: Linker behavior: Link Framework SDKs Only I'm getting the error:

MT3001: Could not AOT the assembly.

/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/macmini01/Desktop/Per/RunningCode_Both/XXX_Mobile Sourcecode_2Apr2018/XXX/XXX.iOS/obj/iPhone/Debug/mtouch-cache/64/Build/OsmSharp.UI.dll' (MT3001) (XXX.iOS**

VincentDondain commented 6 years ago

Hi,

Glad the MT3001 error is fixed for you.

Now please let's keep 1 GitHub issue per reported problem. This issue (#4012) was about the MT3001 error that is now fixed so I will close it.

You're then having a 2nd issue where your app crash with You MUST invoke LoadApplication () before calling base.FinishedLaunching () and I believe this is a Xamarin.Forms issue/question. Please open a new issue here https://github.com/xamarin/Xamarin.Forms/issues/new.

I think you will have to provide more information because you might be doing something wrong in your AppDelegate.cs (a test case is always ideal for us to help you) and also the stack trace you gave us is not symbolicated (not giving us much info).

See https://docs.microsoft.com/en-us/xamarin/ios/troubleshooting/questions/symbolicate-ios-crash and https://jmillerdev.net/symbolicating-ios-crash-files-xamarin-ios/ for how to symbolicate.

TomQv commented 5 years ago

With vs2019 this exact error is back: "Could not AOT the assembly '/Users/..../obj/iPhone/Debug/mtouch-cache/64/3-Build/OsmSharp.dll'" Same project, same settings was fine with vs2018... :(

dharamhbtik commented 5 years ago

I am getting this issue with Visual Studio Community 2019 (Version 16.1.5) and MacOS Catalina (Version 10.15 Beta (19A501i)

Any workaround for this?

rolfbjarne commented 5 years ago

@dktechindia the MT3001 error can have many causes, please file a new issue and attach your complete build log, and we'll have a look to see if it's the same case or not, and if something can be done.

dharamhbtik commented 5 years ago

Here is full log log.txt

here is IDE detail _Microsoft Visual Studio Community 2019 Version 16.1.5 VisualStudio.16.Release/16.1.5+29025.244 Microsoft .NET Framework Version 4.8.03752

Installed Version: Community

Visual C++ 2019 00435-60000-00000-AA114 Microsoft Visual C++ 2019

Application Insights Tools for Visual Studio Package 9.1.00429.1 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019 16.1.429.50124 ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2012 16.1.429.50124 For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2019 16.1.429.50124 For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 16.1.429.50124 Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 16.1.429.50124 Azure Functions and Web Jobs Tools

C# Tools 3.1.1-beta4-19281-06+58a4b1e79aea28115e66b06f850c83a3f1fcb6d3 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.1.77 (master@24013d5) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

GitHub.VisualStudio 2.9.1.7781 A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

GitLab Extension for Visual Studio 1.0.189 A Visual Studio Extension that brings the GitLab Flow into Visual Studio.

IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20419.2

Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 1.0 Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 16.1.1 (2473f22) Support for debugging Mono processes with Visual Studio.

Node.js Tools 1.5.10424.1 Commit Hash:c3ce0ae0b29c0b3a755ffc12f8a685fe7ddd3600 Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager 5.1.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools 16.0.61904.23160 Microsoft SQL Server Data Tools

Syntax Visualizer 1.0 An extension for visualizing Roslyn SyntaxTrees.

TypeScript Tools 16.0.10506.2004 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.1.1-beta4-19281-06+58a4b1e79aea28115e66b06f850c83a3f1fcb6d3 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Linux Development 1.0.9.28917 Visual C++ for Linux Development

Visual F# Tools 10.4 for F# 4.6 16.1.0-beta.19253.3+42526fe359672a05fd562dc16a91a43d0fe047a7 Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

Xamarin 16.1.0.545 (d16-1@db7c858e8) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.1.0.418 (remotes/origin/d16-1@5b958bb10) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.2.112 (4db4af4) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.3.0.23 (HEAD/d0b48056f) Xamarin.Android Reference Assemblies and MSBuild support. Mono: mono/mono/2018-08@3a07bd426d3 Java.Interop: xamarin/java.interop/d16-1@5ddc3e3 LibZipSharp: grendello/LibZipSharp/d16-1@44de300 LibZip: nih-at/libzip/rel-1-5-1@b95cf3f ProGuard: xamarin/proguard/master@905836d SQLite: xamarin/sqlite/3.27.1@8212a2d Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-1@acabd26

Xamarin.iOS and Xamarin.Mac SDK 12.10.0.157 (6bd9475) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support._

dharamhbtik commented 5 years ago

one thing I noticed, it is showing path /Users//Library/ but in my mac Library folder is not under Users folder. It is on the same level as Users folder. How can I correct this ? I think if I can change this path, it should work correctly.

AndreasGassmann commented 5 years ago

@dktechindia I'm facing the same issue. Were you able to resolve it or did you open another issue?

k16blfurm commented 5 years ago

Same, I'm currently having this issue rn.

se commented 5 years ago

I'm also facing the same issue with WatchOsApp. Is there any luck guys?

dharamhbtik commented 5 years ago

@dktechindia I'm facing the same issue. Were you able to resolve it or did you open another issue?

No. I just reverted back to Mojave and everything is working fine now. Xamarin team have to fix it for Catalina.

dmcspadden commented 5 years ago

Same issue here - trying to avoid reverting back to Mojave since Catalina was working. Any update from the xamarin team?

se commented 5 years ago

Same issue here - trying to avoid reverting back to Mojave since Catalina was working. Any update from the xamarin team?

I got an answer like this https://github.com/xamarin/xamarin-macios/issues/6566#issuecomment-519638373. You can check it out.

Uncommon commented 5 years ago

I just started getting this error after updating to VS 8.2.4.

MarMarIV commented 5 years ago

Still same issue on macOS Catalina 10.15 Beta, any solution? I'm affraid to upgrade second MAC with Mojave...

aroyzen1983 commented 5 years ago

Also running into similar issue, did anyone find a work around?

VincentDondain commented 5 years ago

To anyone getting this issue recently: the MT3001 error can have many causes, please file a new issue and attach your complete diagnostic level build log (ideally a test case) as well as your version informations, and we'll have a look to see if it's the same case or not, and if something can be done.