locked
Crash on 64 bit devices after Unified migration RRS feed

  • Question

  • User94060 posted

    We migrated our (Forms) project to unified in our latest version. Everything seemed to work ok on iphone 5 devices and also on iphone 5s/6 simulator. The version was successfully released (no crash reports during Apple review) but now it is in the store, we get reports about the app crashing immediately on iphone 5s and 6 as well as iPad Air, while it is fine on iphone 4s and 5. We assume there is an issue with the 64 bit part.

    After successfully executing the code in AppDelegate::FinishedLaunching (setting up push notifications, etc) it crashes:

    May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: Stacktrace: May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: at <0xffffffff> May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff> May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: at UIKit.UIApplication.Main (string[],intptr,intptr) <0x0002b> May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: at UIKit.UIApplication.Main (string[],string,string) <0x000ab> May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: at netwerkapp.iOS.Application.Main (string[]) <0x00023> May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: at (wrapper runtime-invoke) object.runtimeinvokedynamic (intptr,intptr,intptr,intptr) <0xffffffff> May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: Native stacktrace: May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 0 netwerkappiOS 0x0000000100e2d6e0 netwerkappiOS + 14653152 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 1 netwerkappiOS 0x0000000100e3a5bc netwerkappiOS + 14706108 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 2 libsystemplatform.dylib 0x0000000195ff495c _sigtramp + 68 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 3 netwerkappiOS 0x0000000100f28108 xamarincreatemanagedref + 27912 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 4 Foundation 0x0000000184ef5f9c + 372 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 5 CoreFoundation 0x0000000183fac240 + 24 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 6 CoreFoundation 0x0000000183fab4e4 + 264 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 7 CoreFoundation 0x0000000183fa9594 + 712 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 8 CoreFoundation 0x0000000183ed52d4 CFRunLoopRunSpecific + 396 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 9 GraphicsServices 0x000000018d6f36fc GSEventRunModal + 168 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 10 UIKit 0x0000000188a9afac UIApplicationMain + 1488 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 11 netwerkappiOS 0x0000000100d3a1ac netwerkappiOS + 13656492 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 12 netwerkappiOS 0x0000000100cc3bfc netwerkappiOS + 13171708 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 13 netwerkappiOS 0x0000000100cc3bbc netwerkappiOS + 13171644 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 14 netwerkappiOS 0x0000000100066064 netwerkappiOS + 204900 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 15 netwerkappiOS 0x0000000100591694 netwerkappiOS + 5625492 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 16 netwerkappiOS 0x0000000100e3c7fc netwerkappiOS + 14714876 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 17 netwerkappiOS 0x0000000100e9fc04 netwerkappiOS + 15121412 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 18 netwerkappiOS 0x0000000100ea43a0 netwerkappiOS + 15139744 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 19 netwerkappiOS 0x0000000100f1cc18 netwerkappiOS + 15633432 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 20 netwerkappiOS 0x0000000100dfc448 netwerkappiOS + 14451784 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: 21 libdyld.dylib 0x0000000195e46a08 + 4 May 18 15:02:07 iPhone-Grzegorz netwerkappiOS[4889] : critical: ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= May 18 15:02:07 iPhone-Grzegorz ReportCrash[4890] : tasksetexception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument) May 18 15:02:07 iPhone-Grzegorz ReportCrash[4890] : ReportCrash acting against PID 4889 May 18 15:02:07 iPhone-Grzegorz ReportCrash[4890] : Formulating crash report for process netwerkappiOS[4889] May 18 15:02:07 iPhone-Grzegorz locationd[4540] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 May 18 15:02:07 iPhone-Grzegorz com.apple.xpc.launchd[1] (UIKitApplication:com.appsalad.inscene.InScene[0xf253][4889]) : Service exited due to signal: Abort trap: 6

    ==

    Any help would be appreciated.

    Monday, May 18, 2015 4:02 PM

Answers

  • User39 posted

    This looks like PushWoosh does something they shouldn't do.

    If you file a bug with a test project I can have a look and try to figure out what they're doing.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, May 19, 2015 3:17 PM

All replies

  • User94060 posted

    I've been digging a bit deeper and it seems to be related to the PushWoosh library that we use. If we set a Delegate to obtain token/push messages, it crashes. If we do not set the Delegate all is fine. So it seems something is happening when the native PushWoosh library tries to call our Delegate:

        [Model]
    class PushDelegate : NSObject{
    
        public UIApplication application { set; get; }
    
    
        [Export ("onDidRegisterForRemoteNotificationsWithDeviceToken:")]
        public void  DidRegisterForRemoteNotificationsWithDeviceToken (string token){
            Console.WriteLine ("DidRegisterForRemoteNotificationsWithDeviceToken " + token);
    
            App.PushToken = token;
    
            App.RegisterPushToken();
    
        }
    
        [Export ("onDidFailToRegisterForRemoteNotificationsWithError:")]
        public void DidFailToRegisterForRemoteNotificationsWithError (NSError error){
            Console.WriteLine("onDidFailToRegisterForRemoteNotificationsWithError");
            Console.WriteLine (error);
        }
    
        [Export ("onPushReceived:withNotification:onStart:")]
        public async void PushReceivedWithNotificationOnStart (PushNotificationManager pushManager, NSDictionary pushNotification, bool onStart){
            Console.WriteLine ("PushReceivedWithNotificationOnStart "+onStart);
            Console.WriteLine (pushNotification);
    
            NSDictionary aps = (NSDictionary)pushNotification.ValueForKey(new NSString("aps"));
            NSString u = (NSString)pushNotification.ValueForKey (new NSString("u"));
            if (u == null) {
                u = new NSString ("");
            }
            if (await App.HandlePush (aps.ValueForKey (new NSString("alert")).ToString(), u.ToString(), onStart)) {
                PushNotificationManager.ClearNotificationCenter ();
                application.ApplicationIconBadgeNumber = 0;
    
            }
    
    
        }
    
        [Export ("onPushAccepted:withNotification:")]
        public void PushAcceptedWithNotification (PushNotificationManager pushManager, NSDictionary pushNotification){
            Console.WriteLine ("PushAcceptedWithNotification ");
            Console.WriteLine (pushNotification);
        }
    
        [Export ("onPushAccepted:withNotification:onStart:")]
        public void PushAcceptedWithNotificationOnStart (PushNotificationManager pushManager, NSDictionary pushNotification, bool onStart){
    
            Console.WriteLine ("PushAcceptedWithNotificationOnStart "+onStart);
            Console.WriteLine (pushNotification);
        }
    
        [Export ("onTagsReceived:")]
        public void  TagsReceived (NSDictionary tags){
            Console.WriteLine ("onTagsReceived");
        }
    
        [Export ("onTagsFailedToReceive:")]
        public void  TagsFailedToReceive (NSError error){
            Console.WriteLine ("onTagsFailedToReceive");
        }
    
    }
    
    Tuesday, May 19, 2015 10:09 AM
  • User39 posted

    Can you get a symbolicated crash report from Xcode's Organizer? That might shed more light on what's happening.

    Tuesday, May 19, 2015 12:01 PM
  • User94060 posted

    Yes I can: http://pastebin.com/DgLBFUGL Did not think about re-symbolicating yet.

    (Based on some suggestions online for similar crashes, I also tried different linking settings, without result)

    Tuesday, May 19, 2015 2:48 PM
  • User39 posted

    This looks like PushWoosh does something they shouldn't do.

    If you file a bug with a test project I can have a look and try to figure out what they're doing.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, May 19, 2015 3:17 PM
  • User94060 posted

    Thanks, posted the bug with the PushWoosh sample project (with a minimal modification to show my use of the delegate object) https://bugzilla.xamarin.com/show_bug.cgi?id=30232

    Tuesday, May 19, 2015 4:53 PM