We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SFTextInputLayout - causing my IOS app to crash (Android fine though)

Thread ID:

Created:

Updated:

Platform:

Replies:

144358 May 2,2019 12:56 PM UTC Dec 5,2019 09:01 AM UTC Xamarin.Forms 8
loading
Tags: SfTextInputLayout
Curtis Herrick
Asked On May 2, 2019 01:24 PM UTC

I was having problems with the SfTextInputLayout not displaying Hint text on IOS, with SF tools version 16.4.0.47.
Seeing that this was not the latest official release, I upgraded to latest official release version 17.1.0.38.
Now with this version, every time I load ANY page that uses SfTextInputLayout, it crashes  my app with the following exception:


{System.NullReferenceException: Object reference not set to an instance of an object  at Syncfusion.XForms.TextInputLayout.AnimationHelper+d__0.MoveNext () [0x0003d] in <114dd40a6e6e417bb60541c297edf7f0>:0 --- End of stack trace from previous location where exception was thrown ---  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018   at UIKit.UIKitSynchronizationContext+<>c__DisplayClass1_0.b__0 () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/UIKit/UIKitSynchronizationContext.cs:24   at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/Foundation/NSAction.cs:125   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/11.12.0.4/src/Xamarin.iOS/UIKit/UIApplication.cs:79   at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/UIKit/UIApplication.cs:63   at com.uhb.MyAPP.iOS.Application.Main (System.String[] args) [0x00002] in C:\srclib\Mobile\Applications\MyApp\MyApp\MyApp.iOS\Main.cs:20 }


The XAML markup for my page is attached to this post.  File seems to have not have attached (argh), so here's some of the XAML markup:
                       
(frustrating - XAML will not display if pasted and saved here.  Likely due to security limitations on allowed characters)

Really quite a significant problem for me, as I've used this control on various pages for various input fields.
If I can't get this working soon, I'll need to rewrite all these pages to use a different solution.

Additional exception info:

"InnerException":{"Message":"Object reference not set to an instance of an object", "Data":{}, "TargetSite":"Void Throw()", "StackTrace":" at Syncfusion.XForms.TextInputLayout.AnimationHelper+d__0.MoveNext () [0x0003d] in <114dd40a6e6e417bb60541c297edf7f0>:0



Bharathiraja K [Syncfusion]
Replied On May 3, 2019 06:29 AM UTC

Hi Curtis,  
 
Greetings from Syncfusion. For the same query, you have created incident under your Direct Track account, and we will provide you response in the Direct Track incident. Please login with your Direct Track account to get response for your query. 
 
Regards, 
Bharathi. 


Hafizi
Replied On August 21, 2019 12:46 PM UTC

Hi Curtis,  
 
Greetings from Syncfusion. For the same query, you have created incident under your Direct Track account, and we will provide you response in the Direct Track incident. Please login with your Direct Track account to get response for your query. 
 
Regards, 
Bharathi. 


Hi Bharathi,

Would you mind share with me the solution for this problem? 
I did also facing this same error with my iOS app but it's working fine with Android.

For your reference, i am using the latest, 17.2.0.41 version.


Lakshmi Radha Krishnan [Syncfusion]
Replied On August 22, 2019 10:16 AM UTC

 

Hi Hazifi,

 

We suspect that you may not initialize the Init method in the iOS project. You can resolve this issue in application level by initializing the Init in the AppDelegate file in iOS project. Please find the below code snippet.

 

Code Snippet [C#]: 

public override bool FinishedLaunching(UIApplication app, NSDictionary options) 

    .. 

    SfTextInputLayoutRenderer.Init(); 

    … 

 

Refer the below UG for more details. 

https://help.syncfusion.com/xamarin/sftextinputlayout/getting-started#ios 

 

Please let us know if you are facing different problem than this.

 

Regards,

Lakshmi R.


Hafizi
Replied On August 23, 2019 04:43 AM UTC

 

Hi Hazifi,

 

We suspect that you may not initialize the Init method in the iOS project. You can resolve this issue in application level by initializing the Init in the AppDelegate file in iOS project. Please find the below code snippet.

 

Code Snippet [C#]: 

public override bool FinishedLaunching(UIApplication app, NSDictionary options) 

    .. 

    SfTextInputLayoutRenderer.Init(); 

    … 

 

Refer the below UG for more details. 

https://help.syncfusion.com/xamarin/sftextinputlayout/getting-started#ios 

 

Please let us know if you are facing different problem than this.

 

Regards,

Lakshmi R.


Hi Lakshmi,

Thank you for your reply. After multiple cleaning and rebuild the project, seems like the issue solved already.

Rachel A [Syncfusion]
Replied On August 26, 2019 05:27 AM UTC

Hi Hafizi, 
 
Thanks for the confirmation. 
 
Please let us know if you have any other queries. 
 
Thanks, 
Rachel. 


Chris Henry
Replied On December 4, 2019 03:54 PM UTC

I am experiencing a similar problem. I have upgraded to the SyncFusion v17.3.0.30 and while my app doesn't crash, it still can't render a page with an SfTextInputLayout. I am calling the SfTextInputLayoutRenderer.Init() in the AppDelegate's FinishedLaunching method.

Here is the stack trace:

2019-12-04 10:36:50.336 goRoamPOD.iOS[315:12410] System.NullReferenceException: Object reference not set to an instance of an object
  at Syncfusion.XForms.iOS.TextInputLayout.InputLayoutToggleViewRenderer.LoadToggleIcons () [0x00010] in <38df54b12c704ca98c96e9ae41ec79d4>:0 
  at Syncfusion.XForms.iOS.TextInputLayout.InputLayoutToggleViewRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] 

There's much more Xamarin forms framework calls while the page's structure is set up. The first bits of the stack trace are this:

 at Xamarin.Forms.NavigationPage.PushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x0014e] in d:\agent\1\s\Xamarin.Forms.Core\NavigationPage.cs:242 
  at Prism.Navigation.PageNavigationService+<>c__DisplayClass38_1.<ProcessNavigationForContentPage>b__0 () [0x00050] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:454 
  at Prism.Navigation.PageNavigationService.DoNavigateAction (Xamarin.Forms.Page fromPage, System.String toSegment, Xamarin.Forms.Page toPage, Prism.Navigation.INavigationParameters parameters, System.Func`1[TResult] navigationAction, System.Action onNavigationActionCompleted) [0x000da] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:656 
  at Prism.Navigation.PageNavigationService.ProcessNavigationForContentPage (Xamarin.Forms.Page currentPage, System.String nextSegment, System.Collections.Generic.Queue`1[T] segments, Prism.Navigation.INavigationParameters parameters, System.Nullable`1[T] useModalNavigation, System.Boolean animated) [0x001a3] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:452 
  at Prism.Navigation.PageNavigationService.ProcessNavigation (Xamarin.Forms.Page currentPage, System.Collections.Generic.Queue`1[T] segments, Prism.Navigation.INavigationParameters parameters, System.Nullable`1[T] useModalNavigation, System.Boolean animated) [0x001ca] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:329 
  at goRoamPOD.ViewModels.AppInitPageViewModel.InitAppHandler () [0x00415] in /Users/matthew/Projects/goRoamPOD/goRoamPOD/ViewModels/AppInitPageViewModel.cs:225 

I am using Prism (v7.1) for MVVM and page navigation and what I'm seeing is my OnNavigatingTo method being called 4 or 5 times before the navigation fails and then the aforementioned stack trace in the application output. I have cleaned and rebuilt my iOS platform project a number of times and I can't get past it. Like the original poster, Android is not a problem.

Chris Henry
Replied On December 4, 2019 05:28 PM UTC

It appears as though this particular issue is related to 17.3.0.30, as backing down to 17.3.0.29 does not exhibit the same behavior.

Rachel A [Syncfusion]
Replied On December 5, 2019 09:01 AM UTC

Hi Chris, 
 
Thanks for contacting Syncfusion Support. 
  
We have already fixed the reported issue in our latest version (17.3.0.33). Please upgrade the latest version to resolve this issue. 
 
Thanks, 
Rachel. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon