Xamarin.forms: [Bug] Shell Navigation.PushAsync crashing iOS app in Xamarin.Forms 4.6.0.726

Created on 30 Apr 2020  路  9Comments  路  Source: xamarin/Xamarin.Forms

Description

Using Navigaion.PushAsync in Xamarin.Forms 4.6 throws
'Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[Xamarin_Forms_Platform_iOS_ShellSectionRenderer_NavDelegate navigationController:animationControllerForOperation:fromViewController:toViewController:]: unrecognized selector sent to instance 0x2813416d0
and application crashes

Steps to Reproduce

  1. Start > New Xamarin.Forms ios project
  2. Update to Xamarin.Forms 4.6
  3. Click navigate to ItemDetailPage

Basic Information

  • Version with issue: Xamarn.Forms 4.6
  • Last known good version: Xamarin.Forms 4.5
  • IDE: Visual Studio 2019 latest

Workaround

Downgrade to xamarin.forms 4.5

4.6.0 navigation shell 3 external-hotrestart high regression in-progress iOS 馃崕 bug

Most helpful comment

Seems to be some problem with hot restart. Works when i using a real device connected to mac.

All 9 comments

@deja135 What device/simulator version are you seeing this on? I've tried it on a 13.4 simulator and a 10.3 simulator and so far I haven't run into the problem.

@hartez iPhone 11 Pro Max is the only device i've tested on yet.

_10519 Repro.zip

This is my attempt at a repro - if I tap on an item to push the detail page, it's working fine and I'm not seeing a crash. Is there some detail I'm missing?

Wierd. I downloaded your repro, run it on my phone and tapped one list item and it crashes...

Here is the stack trace

[0:] An error occurred: 'Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: -[Xamarin_Forms_Platform_iOS_ShellSectionRenderer_NavDelegate navigationController:animationControllerForOperation:fromViewController:toViewController:]: unrecognized selector sent to instance 0x2838bbec0
Native stack trace:
    0   CoreFoundation                      0x00000001bf394178 9624AAFD-5437-3772-A507-0F357875808D + 1253752
    1   libobjc.A.dylib                     0x00000001bf0a8c1c objc_exception_throw + 60
    2   CoreFoundation                      0x00000001bf2927e0 9624AAFD-5437-3772-A507-0F357875808D + 198624
    3   CoreFoundation                      0x00000001bf3985d4 9624AAFD-5437-3772-A507-0F357875808D + 1271252
    4   CoreFoundation                      0x00000001bf39ab60 _CF_forwarding_prep_0 + 96
    5   UIKitCore                           0x00000001c2de3f78 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 3616632
    6   UIKitCore                           0x00000001c2de61e4 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 3625444
    7   UIKitCore                           0x00000001c2de5b5c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 3623772
    8   Xamarin.PreBuilt.iOS                0x0000000102ad2924 do_icall + 384
    9   Xamarin.PreBuilt.iOS                0x0000000102ad0f28 do_icall_wrapper + 296
    10  Xamarin.PreBuilt.iOS                0x0000000102ac9cfc interp_exec_method_full + 1660
    11  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    12  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    13  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    14  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    15  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    16  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    17  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    18  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    19  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    20  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    21  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    22  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    23  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    24  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    25  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    26  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    27  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    28  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    29  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    30  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    31  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    32  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    33  Xamarin.PreBuilt.iOS                0x0000000102ac8848 interp_runtime_invoke + 352
    34  Xamarin.PreBuilt.iOS                0x000000010292b7b0 mono_jit_runtime_invoke + 904
    35  Xamarin.PreBuilt.iOS                0x00000001029e0400 mono_runtime_try_invoke + 156
    36  Xamarin.PreBuilt.iOS                0x00000001029e20a0 mono_runtime_invoke + 100
    37  Xamarin.PreBuilt.iOS                0x0000000102854cec _ZL30native_to_managed_trampoline_9P11objc_objectP13objc_selectorPP11_MonoMethodS0_j + 436
    38  Xamarin.PreBuilt.iOS                0x00000001028a57bc -[__UITapGestureRecognizer target:] + 64
    39  UIKitCore                           0x00000001c309c54c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6468940
    40  UIKitCore                           0x00000001c30a5b30 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6507312
    41  UIKitCore                           0x00000001c30a2528 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6493480
    42  UIKitCore                           0x00000001c30a1a70 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6490736
    43  UIKitCore                           0x00000001c3095430 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6439984
    44  UIKitCore                           0x00000001c3094bc4 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6437828
    45  UIKitCore                           0x00000001c3094980 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6437248
    46  UIKitCore                           0x00000001c351c044 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 11186244
    47  UIKitCore                           0x00000001c34f71cc 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 11035084
    48  UIKitCore                           0x00000001c3579e0c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 11570700
    49  UIKitCore                           0x00000001c357ca14 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 11581972
    50  UIKitCore                           0x00000001c3574c88 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 11549832
    51  CoreFoundation                      0x00000001bf30f860 9624AAFD-5437-3772-A507-0F357875808D + 710752
    52  CoreFoundation                      0x00000001bf30f7b4 9624AAFD-5437-3772-A507-0F357875808D + 710580
    53  CoreFoundation                      0x00000001bf30ef04 9624AAFD-5437-3772-A507-0F357875808D + 708356
    54  CoreFoundation                      0x00000001bf309ca4 9624AAFD-5437-3772-A507-0F357875808D + 687268
    55  CoreFoundation                      0x00000001bf309660 CFRunLoopRunSpecific + 480
    56  GraphicsServices                    0x00000001c971a604 GSEventRunModal + 164
    57  UIKitCore                           0x00000001c34de15c UIApplicationMain + 1944
    58  Xamarin.PreBuilt.iOS                0x0000000102ad2880 do_icall + 220
    59  Xamarin.PreBuilt.iOS                0x0000000102ad0f28 do_icall_wrapper + 296
    60  Xamarin.PreBuilt.iOS                0x0000000102ac9cfc interp_exec_method_full + 1660
    61  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    62  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    63  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    64  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    65  Xamarin.PreBuilt.iOS                0x0000000102ac8848 interp_runtime_invoke + 352
    66  Xamarin.PreBuilt.iOS                0x000000010292b7b0 mono_jit_runtime_invoke + 904
    67  Xamarin.PreBuilt.iOS                0x00000001029debe4 mono_runtime_invoke_checked + 148
    68  Xamarin.PreBuilt.iOS                0x00000001029e5450 mono_runtime_try_invoke_array + 1284
    69  Xamarin.PreBuilt.iOS                0x0000000102988b44 ves_icall_InternalInvoke + 1036
    70  Xamarin.PreBuilt.iOS                0x000000010299b508 ves_icall_InternalInvoke_raw + 108
    71  Xamarin.PreBuilt.iOS                0x0000000102ad280c do_icall + 104
    72  Xamarin.PreBuilt.iOS                0x0000000102ad0f28 do_icall_wrapper + 296
    73  Xamarin.PreBuilt.iOS                0x0000000102ac9cfc interp_exec_method_full + 1660
    74  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    75  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    76  Xamarin.PreBuilt.iOS                0x0000000102ac9f4c interp_exec_method_full + 2252
    77  Xamarin.PreBuilt.iOS                0x0000000102ac9fc4 interp_exec_method_full + 2372
    78  Xamarin.PreBuilt.iOS                0x0000000102ac8848 interp_runtime_invoke + 352
    79  Xamarin.PreBuilt.iOS                0x000000010292b7b0 mono_jit_runtime_invoke + 904
    80  Xamarin.PreBuilt.iOS                0x00000001029debe4 mono_runtime_invoke_checked + 148
    81  Xamarin.PreBuilt.iOS                0x00000001029e3fcc mono_runtime_exec_main_checked + 128
    82  Xamarin.PreBuilt.iOS                0x000000010290fbfc mono_jit_exec + 376
    83  Xamarin.PreBuilt.iOS                0x0000000102ac65bc xamarin_main + 2148
    84  Xamarin.PreBuilt.iOS                0x00000001028d45a8 main + 84
    85  libdyld.dylib                       0x00000001bf1851ec 95B366E7-F5BD-3308-9416-24B35999029B + 4588
'. Callstack: '  at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:406 
  at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128 
  at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)
  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.16.0.13/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.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at _10519.iOS.Application.Main (System.String[] args) [0x00001] in C:\repos\_10519.Repro\_10519\_10519.iOS\Main.cs:17 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 
--- End of stack trace from previous location where exception was thrown ---

  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.16.0.13/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.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at _10519.iOS.Application.Main (System.String[] args) [0x00001] in C:\repos\_10519.Repro\_10519\_10519.iOS\Main.cs:17 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 '
2020-05-04 08:49:04.855 Xamarin.PreBuilt.iOS[1030:359486] -[Xamarin_Forms_Platform_iOS_ShellSectionRenderer_NavDelegate navigationController:animationControllerForOperation:fromViewController:toViewController:]: unrecognized selector sent to instance 0x2838bbec0
The app has been terminated.

Seems to be some problem with hot restart. Works when i using a real device connected to mac.

I麓ve experienced the same issue when I deploy the apps via hot restart, but if I deploy them by connecting to my mac then there is no issue at all.

I've encountered this error today with a new Xamarin Shell project without any other modifications.
This is really serious, as it is impossible to develop without a Mac without downgrading Xamarin Forms, and it might be a show stopper for anyone trying Xamarin Forms.

Any time frame for fixing this?.

I've logged this issue with the Hot Restart team.
I'll update the issue here with their findings

Internal ticket:
https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1138549

Was this page helpful?
0 / 5 - 0 ratings