When running an SfChat app on an iOS 15 device I get the following null pointer exception when clicking on the Editor text (not able to type anything, getting an exception right away):
Object reference not set to an instance of an object.
at Syncfusion.ListView.XForms.iOS.ExtendedScrollViewRenderer.LayoutSubviews () [0x000ce] in
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:69
at EssentialUIKit.iOS.Application.Main (System.String[] args) [0x00001]
I can't unfortunately send the whole project but I'd suggest just setting a try-catch block (or check for nulls) in your iOS.ExtendedScrollViewRenderer.LayoutSubviews () method. But I attach my chat xaml file.
Attachment: ChatPage.xaml_ca0d76d.zip
Hi Suja,
You used an emulator. The problem is that I also have not been able to repro it with an emulator, only with a real device.
But... you don't have to reproduce it - can you just catch the exception or check an object for null? This is a very recent code modification on your end, right after 19.0.3.44 ... I hope the code inside of
Syncfusion.ListView.XForms.iOS.ExtendedScrollViewRenderer.LayoutSubviews ()
is not that large to figure out where the problem occurs?
Thanks,
Hi Suja,
Where is {Syncfusion Installed location} on a Mac?
Thanks, Vassili
Hi Suja,
I did as you instructed... and unfortunately I'm still getting the crash....
I'm running it in Debug mode on a real device (iPhone XS on iOS 15). Not only can't I repro it on an emulator, but also it's not easy to repro it on a device. There is only one chat dialog where I get a 100% repro (it's fine with other dialogs (unfortunately)). And, as mentioned, all is also fine as soon as I downgrade the Syncfusion version.
My suggestion is the following: could you provide me with another custom dll, but having maybe more print-outs (I would be able to see them in the application output in my VS for Mac and send them to you), or any other sort of messages to be able to get to the problem (even pop-up dialogs, etc.?
Thanks, Vassili
Hi Suja,
I'm sorry, I was wrong. After complete cleaning and re-building I can confirm indeed that your fix works.
I don't have crashes anymore if I use your custom version of SfListView in 19.0.3.54.
As soon as I change your custom version back to the official one, I always get crashes.
Hopefully your custom version makes it soon into a new release.
Thanks a lot,
Vassili