Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gastropods crashes at startup when linking all assemblies #1

Closed
francedot opened this issue Jun 23, 2018 · 2 comments
Closed

Gastropods crashes at startup when linking all assemblies #1

francedot opened this issue Jun 23, 2018 · 2 comments

Comments

@francedot
Copy link

francedot commented Jun 23, 2018

Description

Android app crashes at startup when in release mode and linking all assemblies.

Expected Behavior

App should not crash

Actual Behavior

App crashes

Basic Information

  • Version with issue: Xamarin.Forms 3.2.0.599850
  • Last known good version: unknown
  • IDE: VS for Mac
  • Platform Target Frameworks:
    • Android: 8.0
  • Affected Devices: Xiaomi Mi A1

ADB log

06-23 09:51:27.329 21329 21329 I MonoDroid: UNHANDLED EXCEPTION:
06-23 09:51:27.357 21329 21329 I MonoDroid: System.MissingMethodException: Default constructor not found for type XamlGeneratedCode._Type1
06-23 09:51:27.358 21329 21329 I MonoDroid: at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at System.Activator.CreateInstance (System.Type type) [0x00000] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Xamarin.Forms.ResourceDictionary+<>c.b__11_0 (System.Type key) [0x00000] in <4ddec8d0c9be40dc9f1ea28da626ec34>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at System.Runtime.CompilerServices.ConditionalWeakTable2[TKey,TValue].GetValue (TKey key, System.Runtime.CompilerServices.ConditionalWeakTable2+CreateValueCallback[TKey,TValue] createValueCallback) [0x00033] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Xamarin.Forms.ResourceDictionary.SetAndLoadSource (System.Uri value, System.String resourcePath, System.Reflection.Assembly assembly, System.Xml.IXmlLineInfo lineInfo) [0x00036] in <4ddec8d0c9be40dc9f1ea28da626ec34>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Gastropod.Shell.InitializeComponent () [0x00130] in <188a67a3cf6748c3bd0f73cccf2c7e52>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Gastropod.Shell..ctor () [0x00006] in <188a67a3cf6748c3bd0f73cccf2c7e52>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Gastropod.App..ctor () [0x0000c] in <188a67a3cf6748c3bd0f73cccf2c7e52>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Gastropod.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00022] in :0
06-23 09:51:27.358 21329 21329 I MonoDroid: at Android.App.Activity.n_OnCreate_Landroid_os_Bundle
(System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <836fbced75db44a0b15e72c7622b1856>:0
06-23 09:51:27.358 21329 21329 I MonoDroid: at (wrapper dynamic-method) System.Object.6054b2d3-ba69-40f0-9f35-72d42e8aa5bb(intptr,intptr,intptr)
06-23 09:51:27.369 21329 21329 W zygote : JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
06-23 09:51:27.372 21329 21329 D AndroidRuntime: Shutting down VM
06-23 09:51:27.373 21329 21329 E AndroidRuntime: FATAL EXCEPTION: main
06-23 09:51:27.373 21329 21329 E AndroidRuntime: Process: com.xamarin.Gastropod, PID: 21329
06-23 09:51:27.373 21329 21329 E AndroidRuntime: android.runtime.JavaProxyThrowable: System.MissingMethodException: Default constructor not found for type XamlGeneratedCode._Type1
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at System.Activator.CreateInstance (System.Type type) [0x00000] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Xamarin.Forms.ResourceDictionary+<>c.b__11_0 (System.Type key) [0x00000] in <4ddec8d0c9be40dc9f1ea28da626ec34>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at System.Runtime.CompilerServices.ConditionalWeakTable2[TKey,TValue].GetValue (TKey key, System.Runtime.CompilerServices.ConditionalWeakTable2+CreateValueCallback[TKey,TValue] createValueCallback) [0x00033] in <0a74340dcb5346e6a45596b39b9ff4d0>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Xamarin.Forms.ResourceDictionary.SetAndLoadSource (System.Uri value, System.String resourcePath, System.Reflection.Assembly assembly, System.Xml.IXmlLineInfo lineInfo) [0x00036] in <4ddec8d0c9be40dc9f1ea28da626ec34>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Gastropod.Shell.InitializeComponent () [0x00130] in <188a67a3cf6748c3bd0f73cccf2c7e52>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Gastropod.Shell..ctor () [0x00006] in <188a67a3cf6748c3bd0f73cccf2c7e52>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Gastropod.App..ctor () [0x0000c] in <188a67a3cf6748c3bd0f73cccf2c7e52>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Gastropod.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00022] in :0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at Android.App.Activity.n_OnCreate_Landroid_os_Bundle
(System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <836fbced75db44a0b15e72c7622b1856>:0
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at (wrapper dynamic-method) System.Object.6054b2d3-ba69-40f0-9f35-72d42e8aa5bb(intptr,intptr,intptr)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at md5232e9e0501e27164a833127ea35275a9.MainActivity.n_onCreate(Native Method)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at md5232e9e0501e27164a833127ea35275a9.MainActivity.onCreate(MainActivity.java:29)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6975)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2784)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2906)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1605)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.os.Looper.loop(Looper.java:172)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6637)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
06-23 09:51:27.373 21329 21329 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
06-23 09:51:27.379 2309 3333 W ActivityManager: Force finishing activity com.xamarin.Gastropod/md5232e9e0501e27164a833127ea35275a9.MainActivity

@francedot
Copy link
Author

David, I'll file a new issue in Xamarin.Forms/issues if you confirm this is not an issue within the app.

@francedot francedot changed the title Gastropods crashes at startup when in release mode Gastropods crashes at startup when linking all assemblies Jun 23, 2018
@davidortinau
Copy link
Owner

@francedot yes, please file an issue over there. AOT also blows the app up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants