简体   繁体   中英

App Crashes On IOS Start Up In PCL Xamarin

PCL Project Which Crashes after Splash Screen on IOS I have a try catch on IOS StartUp
On Main.cs

try
{
     UIApplication.Main(args, null, "AppDelegate");
}
catch (System.Exception exception)
{
     Crashes.TrackError(exception);
}

So i debug the project and it goes to App() And When InitializeComponent();
It goes into catch with
Exception Message: Cannot invoke method with stack pointers via reflection

Here's StackTrace

  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00096] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:426 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Reflection/MethodBase.cs:53 
  at Xamarin.Forms.Xaml.TypeConversionExtensions.ConvertTo (System.Object value, System.Type toType, System.Func`1[TResult] getConverter, System.IServiceProvider serviceProvider) [0x002f8] in D:\agent\_work\1\s\Xamarin.Forms.Core\Xaml\TypeConversionExtensions.cs:180 
  at Xamarin.Forms.Xaml.TypeConversionExtensions.ConvertTo (System.Object value, System.Type toType, System.Func`1[TResult] minfoRetriever, System.IServiceProvider serviceProvider) [0x00021] in D:\agent\_work\1\s\Xamarin.Forms.Core\Xaml\TypeConversionExtensions.cs:76 
  at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.TrySetProperty (System.Object element, System.String localName, System.Object value, System.Xml.IXmlLineInfo lineInfo, Xamarin.Forms.Xaml.Internals.XamlServiceProvider serviceProvider, Xamarin.Forms.Xaml.HydrationContext context, System.Exception& exception) [0x00090] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:479 
  at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.SetPropertyValue (System.Object xamlelement, Xamarin.Forms.Xaml.XmlName propertyName, System.Object value, System.Object rootElement, Xamarin.Forms.Xaml.INode node, Xamarin.Forms.Xaml.HydrationContext context, System.Xml.IXmlLineInfo lineInfo) [0x0008d] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:334 
  at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.Visit (Xamarin.Forms.Xaml.ValueNode node, Xamarin.Forms.Xaml.INode parentNode) [0x0005d] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:52 
  at Xamarin.Forms.Xaml.ValueNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00000] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlNode.cs:86 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00043] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlNode.cs:143 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlNode.cs:145 
  at Xamarin.Forms.Xaml.FillResourceDictionariesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode parentNode) [0x000bf] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\FillResourceDictionariesVisitor.cs:52 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00012] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlNode.cs:139 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlNode.cs:145 
  at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00043] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlNode.cs:201 
  at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydrationContext visitorContext) [0x0006e] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:140 
  at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) [0x0004b] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:89 
  at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType) [0x0002f] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:68 
  at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.Type callingType) [0x00000] in D:\agent\_work\1\s\Xamarin.Forms.Xaml\ViewExtensions.cs:36 
  at MyApp.App.InitializeComponent () [0x00001] in /Users/bkp/Downloads/MyApp-xamarin/Source/MyApp/MyApp/obj/Debug/MyApp.App.xaml.g.cs:19 
  at MyApp.App..ctor () [0x00008] in /Users/bkp/Downloads/MyApp-xamarin/Source/MyApp/MyApp/App.xaml.cs:22 
  at MyApp.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication uiApplication, Foundation.NSDictionary launchOptions) [0x00034] in /Users/bkp/Downloads/MyApp-xamarin/Source/MyApp/iOS/AppDelegate.cs:51 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.3.2/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.3.2/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at MyApp.iOS.Application.Main (System.String[] args) [0x00002] in /Users/bkp/Downloads/MyApp-xamarin/Source/MyApp/iOS/Main.cs:15 

What causing this exception?
can someone help me out with it

Updating Xamarin.forms Resolved my issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM