Syncfusion controls cause crash with latest Visual Studio version (16.9.2)

I'm at my wits end with anything Xamarin.iOS related. Every time Microsoft release a new Visual Studio version, something on iOS stops working.
So anyway, the latest version is affecting SyncFusion controls. Specifically TextInputLayout, but it may be others.
It works fine on Android.

The error is this:

Object reference not set to an instance of an object.'. Callstack: '  at Syncfusion.XForms.iOS.TextInputLayout.InputLayoutToggleViewRenderer.LoadToggleIcons () <0x127893730 + 0x00020> in <0edbf8e6b0fa492dbfc1b5696b411589>:0 
  at Syncfusion.XForms.iOS.TextInputLayout.InputLayoutToggleViewRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) <0x127892950 + 0x00062>  .....

Does anyone have a clue? Yes, I do have SfTextInputLayoutRenderer.Init(); in appdelegate.cs. Nothing in my app has changed lately, I simply tried running it with the latest VS version.







4 Replies 1 reply marked as answer

GR Graeme March 17, 2021 06:14 AM UTC

I have sorted of narrowed it down to this:

<inputLayout:SfTextInputLayout ContainerType="Outlined" ContainerBackgroundColor="White" InputViewPadding="{OnPlatform Android='11,0,11,0', iOS='11,6,11,6'}">
     <combobox:SfComboBox  Watermark="Gender" HeightRequest="{OnPlatform Android=46, iOS=34}" IsEditableMode="False">
     </combobox:SfComboBox>
</inputLayout:SfTextInputLayout>

I like to put the ComboBox in the InputLayout to maintain a consistent feel across the page and devices.
If I remove the ComboBox from inside the InputLayout, then the page displays fine.

However, and here's the kicker, it doesn't crash all apps. A basic app put together with the above layout may, OR MAY NOT, crash
I can't identify why this is the case.


SS Sridevi Sivakumar Syncfusion Team March 17, 2021 02:43 PM UTC

Hi Graeme, 
  
Greetings from Syncfusion. 
  
We have analyzed your query with provided code snippet. We suspect this problem occurs due to delay resource shipping in your application. Please make sure the  SfTextInputLayoutRenderer.Init() added before loading application in appdelegate.cs file. 
  
public override bool FinishedLaunching(UIApplication app, NSDictionary options) 
{ 
    global::Xamarin.Forms.Forms.Init(); 
    SfTextInputLayoutRenderer.Init(); 
    LoadApplication(new App()); 
    return base.FinishedLaunching(app, options); 
} 
  
 
  
  
Please clean your application using below steps. 
  
1.       Uninstall the Syncfusion nugets installed in your application. 
2.       Delete bin and obj folder in your application. 
3.       Clean the nuget cache using below link. 
4.       Then install our Syncfusion nuget in your application. 
  
Then test this problem. If you still face the problem, please update us the Syncfusion version used in your application. This will help us to provide you a better solution at the earliest.

Regards,
 
Sridevi S. 


Marked as answer

GR Graeme March 18, 2021 09:38 AM UTC

Hi Sridevi
Thank you very much for the quick response.
Deleting the bin and obj folders solved it.

Regards
Graeme


SS Sridevi Sivakumar Syncfusion Team March 18, 2021 01:09 PM UTC

Hi Graeme,

Thanks for your update.

Let us know if you need any further assistance.

Regards,

Sridevi S. 


Loader.
Up arrow icon