Thanks to visit codestin.com
Credit goes to github.com

Skip to content

condition !rgctx_arg || !imt_arg' not met` when AOTing iOS project using Default Interface Method #18276

@chamons

Description

@chamons

An interface with a DIM that is defined inside a generic class causes a crash during AOTing. See comment below for standalone repro steps.

Original bug report below.


From @cosminstirbu on Fri, 20 Dec 2019 11:43:34 GMT

Hello,

After adding <LangVersion>8.0</LangVersion> and creating an interface with default implementation, I get the following exception in Release mode: MTOUCH : error MT3001: Could not AOT the assembly

Please note that in Debug mode everything works as expected.

Steps to Reproduce

  • git clone [email protected]:FortechRomania/xamarin-training-sample-app.git
  • cd xamarin-training-sample-app
  • git checkout feature/weakify-tableview-datasource
  • open TrainingPreparation.sln and build for iOS Device
  • Comment out iOS/ObservingPlainTableViewSource.cs (124) and the problem will disappear.
Visual Studio Enterprise 2019 for Mac
Version 8.3.11 (build 1)
Installation UUID: 3564627f-be3d-4606-9bfb-522ee1e2f762
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 5.16.1.24 (d16-3 / 08809f5b)

	Package version: 604000208

Mono Framework MDK
Runtime:
	Mono 6.4.0.208 (2019-06/07c23f2ca43) (64-bit)
	Package version: 604000208

NuGet
Version: 5.3.0.6192

.NET Core SDK
SDK: /usr/local/share/dotnet/sdk/3.0.101/Sdks
SDK Versions:
	3.0.101
	3.0.100
	3.0.100-preview9-014004
	3.0.100-preview8-013656
	2.1.701
	2.1.700
	2.1.505
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Sdks

.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	3.0.1
	3.0.0
	3.0.0-preview9-19423-09
	2.1.14
	2.1.13
	2.1.12
	2.1.11
	2.1.9

Xamarin.Profiler
Version: 1.6.11.16
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode 11.2.1 (15526.1)
Build 11B500

Xamarin.Mac
Version: 6.6.0.12 (Visual Studio Enterprise)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:07-0400

Xamarin.iOS
Version: 13.6.0.12 (Visual Studio Enterprise)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:08-0400

Xamarin Designer
Version: 16.3.0.256
Hash: 8a223bfd7
Branch: remotes/origin/d16-3
Build date: 2019-11-01 21:02:02 UTC

Xamarin.Android
Version: 10.0.6.2 (Visual Studio Enterprise)
Commit: xamarin-android/d16-3/c407838
Android SDK: /Users/cosminstirbu/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		5.1 (API level 22)
		7.1 (API level 25)
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.5
SDK Build Tools Version: 29.0.2

Build Information: 
Mono: mono/mono/2019-06@476d72b9e32
Java.Interop: xamarin/java.interop/d16-3@5836f58
LibZipSharp: grendello/LibZipSharp/d16-3@71f4a94
LibZip: nih-at/libzip/rel-1-5-1@b95cf3fd
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.27.1@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3@cb41333

Microsoft Mobile OpenJDK
Java SDK: /Users/cosminstirbu/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 1.4.0.65
Hash: c33b107
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:22 UTC

Android Device Manager
Version: 1.2.0.116
Hash: d2b2af0
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:42 UTC

Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

Build Information
Release ID: 803110001
Git revision: 6ee6ad2ec46ae5a08a1999ee4c815ac656a35b91
Build date: 2019-12-05 16:09:27+00
Build branch: release-8.3
Xamarin extensions: 56bd70ef2e327f71c615cfc29a47fd50685fadcb

Operating System
Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
    Thu Apr 25 23:16:27 PDT 2019
    root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

Enabled user installed extensions
DeepClean 1.2.5
Straight8's SpecFlow Integration 1.11.3.0
FileNesting 0.1.2
StyleCop Support 1.1.0.4
NuGet Package Management Extensions 0.20

Thank you,
Cosmin

Copied from original issue dotnet/macios#7632

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions