Skip to content

Handle ReflectionTypeLoadException in jnimarshalmethod-gen.exe #381

@radekdoulik

Description

@radekdoulik

After XA mono bump to mono-2018-06 I am seeing jnimarshalmethod-gen.exe crashes with unhandled exception like the one below. It happens when building the XF test in XA.

EXEC : error : jnimarshalmethod-gen: Unable to process assembly 'obj/Release/linksrc/Xamarin.Forms.Performance.Integration.Droid.dll' [/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj]
  Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown. (TaskId:3132)
  System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown. (TaskId:3132)
    at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool) (TaskId:3132)
    at System.Reflection.Assembly.GetTypes () [0x00000] in /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/external/mono/mcs/class/corlib/System.Reflection/Assembly.cs:410  (TaskId:3132)
    at System.Reflection.Assembly+<get_DefinedTypes>d__141.MoveNext () [0x0001e] in /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/external/mono/mcs/class/corlib/System.Reflection/Assembly.cs:1025  (TaskId:3132)
    at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateMarshalMethodAssembly (System.String path) [0x0034f] in /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/external/Java.Interop/tools/jnimarshalmethod-gen/App.cs:248  (TaskId:3132)
    at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.ProcessAssemblies (System.Collections.Generic.List`1[T] assemblies) [0x0010a] in /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/external/Java.Interop/tools/jnimarshalmethod-gen/App.cs:179  (TaskId:3132)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions