Bug 30620 - Android AOT: Error setting up ISupportMenuItemInvoker class vtable
Summary: Android AOT: Error setting up ISupportMenuItemInvoker class vtable
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler (show other bugs)
Version: 7.1 (C9)
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2015-05-30 17:54 UTC by Jerome Laban
Modified: 2017-06-20 16:15 UTC (History)
7 users (show)

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


Attachments

Description Jerome Laban 2015-05-30 17:54:18 UTC
When building an app using AOT (xamarin.android 5.1.2.0), the following error happens when AOTing the Xamarin.Android.Support.v4.dll file.

Xamarin.Android.Support.v4 Package is :
 <package id="Xamarin.Android.Support.v4" version="21.0.3.0" targetFramework="monoandroid5" userInstalled="true" />

1>Mono arguments: --llvm --aot=outfile=C:\s\App\Sources\App.Android\obj\Release\aot\armeabi-v7a\libaot-Xamarin.Android.Support.v4.dll.so,asmwriter,mtriple=armv7-linux-gnueabi,tool-prefix=C:\android\ndk\android-ndk-r10d\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-,ld-flags=C:\android\ndk\android-ndk-r10d\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9\libgcc.a;C:\android\ndk\android-ndk-r10d\platforms\android-21\arch-arm\usr\lib\libc.so;C:\android\ndk\android-ndk-r10d\platforms\android-21\arch-arm\usr\lib\libm.so,llvm-path="C:\Program Files (x86)\MSBuild\Xamarin\Android" C:\s\App\Sources\App.Android\obj\Release\android\assets\Xamarin.Android.Support.v4.dll
1>MONO_PATH=C:\s\App\Sources\App.Android\obj\Release\android\assets
1>1AE42E2B-67C7-4F83-AD77-5170B52512E7
1>[aot-compiler stderr] 
1>[aot-compiler stderr] This application has requested the Runtime to terminate it in an unusual way.
1>[aot-compiler stderr] Please contact the application's support team for more information.
1>[aot-compiler stdout] WARNING: The runtime version supported by this application is unavailable.
1>[aot-compiler stdout] Using default runtime: v4.0.30319
1>[aot-compiler stdout] Mono Ahead of Time compiler - compiling assembly C:\s\App\Sources\App.Android\obj\Release\android\assets\Xamarin.Android.Support.v4.dll
1>[aot-compiler stdout] Executing opt: "C:\Program Files (x86)\MSBuild\Xamarin\Android\opt" -f -targetlibinfo -no-aa -basicaa -notti -instcombine -simplifycfg -inline-cost -inline -sroa -domtree -early-cse -lazy-value-info -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -indvars -loop-idiom -loop-deletion -loop-unroll -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -correlated-propagation -domtree -memdep -adce -simplifycfg -instcombine -strip-dead-prototypes -domtree -verify -o "temp.opt.bc" "temp.bc"
1>[aot-compiler stdout] Executing llc: "C:\Program Files (x86)\MSBuild\Xamarin\Android\llc"  -mattr=+vfp2,-neon,+d16 -asm-verbose=false -disable-gnu-eh-frame -enable-mono-eh-frame -mtriple=armv7-linux-gnueabi -mono-eh-frame-symbol=mono_aot_Xamarin_Android_Support_v4_eh_frame -relocation-model=pic -filetype=obj -o "temp-llvm.o" "temp.opt.bc"
1>[aot-compiler stdout] Error setting up ISupportMenuItemInvoker class vtable
1>[aot-compiler stdout] 
1>[aot-compiler stdout] 
1>[aot-compiler stderr] 
1>Could not AOT the assembly: obj\Release\android\assets\Xamarin.Android.Support.v4.dll

The crash in the event viewer is as follows:

Faulting application name: cross-arm.exe, version: 0.0.0.0, time stamp: 0xc5b493a0
Faulting module name: cross-arm.exe, version: 0.0.0.0, time stamp: 0xc5b493a0
Exception code: 0x40000015
Fault offset: 0x0005ea9a
Faulting process id: 0x14a18
Faulting application start time: 0x01d09b0e15827d1c
Faulting application path: C:\Program Files (x86)\MSBuild\Xamarin\Android\cross-arm.exe
Faulting module path: C:\Program Files (x86)\MSBuild\Xamarin\Android\cross-arm.exe
Report Id: 0b885f1e-5f57-413e-983c-40550ee8824b
Faulting package full name: 
Faulting package-relative application ID:
Comment 1 Abhishek 2015-07-09 13:50:25 UTC
I have tried this issue and able to reproduce the reported behavior at my end.

Steps To Reproduce:
1. Create an Android application.
2. Add package Xamarin.Android.Support.V4 version 21.0.3.0
3. Set the configuration to Release.
4. Right click on the project go to properties.
5. Enable AOT. Run the application on Device/Emulator.


Screencast: http://www.screencast.com/t/ammetrMRo
IDE log: https://gist.github.com/anonymous/0203f414e563f2f16ddd
Build Output: https://gist.github.com/anonymous/563154f77dbf2eb9b15f

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.6.00007

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0446016-02589
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0446016-02589
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0446016-02589
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446016-02589
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446016-02589
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446016-02589
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446016-02589
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

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

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

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

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Compact & SQLite Toolbox   4.1.0
SQL Server Compact & SQLite Toolbox adds scripting, import, export, rename, query execution and much more to SQL Server Compact & SQLite Data Connections.

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.11.666.0 (ebae43a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.4.16 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.2.0 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 2 Al Clark [MSFT] 2015-08-12 05:42:10 UTC
Customer's version information:

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA979
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA979
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA979
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA979
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-80000-00000-AA979
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA979
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

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

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft.Pex.VisualStudio   1.0
Pex

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Syntax Visualizer   1.0
An extension for visualizing Roslyn SyntaxTrees.

Visual Studio Tools for Universal Windows Apps   14.0.23121.00 D14OOB
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   3.11.836.0 (ed5c750)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.5.3 (f98871a95a479f6d71b3067b7e5834d41fcb2118)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.10.4.0 (6db87c53c073f4af2f5247fb738a27ea08c094fd)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration

Note You need to log in before you can comment on or make changes to this bug.