[iOS] NullReferenceException when navigating away or switching tabs with Xamarin.Forms 3.3.0.912540

10 posts, 1 answers
  1. Jeremy
    Jeremy avatar
    9 posts
    Member since:
    Sep 2018

    Posted 22 Oct 2018 Link to this post

    Also posted here:

    https://feedback.telerik.com/Project/168/Feedback/Details/258349-ios-datagrid-causes-nullreferenceexception-when-navigating-away

    And here:

    https://github.com/xamarin/Xamarin.Forms/issues/4178

    Looks like there was a regression sometime between Xamarin.Forms 3.2.0.839982 and version 3.3.0.912540 with the DataGrid. After a DataGrid becomes visible on a page (or just on a page that becomes visible, even if the DataGrid itself is set to IsVisible = false), a NullReferenceException occurs if you navigate away or switch tabs in a RadTabView. Seems to only happen on iOS, and started happening when I upgraded from Xamarin.Forms from 3.2.0.839982 to version 3.3.0.912540. Possibly a Xamarin.Forms bug and not a Telerik bug.

    In case anyone else has the same issue, the workaround for me is just to go back to Xamarin.Forms 3.2.0.839982 (not sure if the issue occurs in the other 3.2.* version in between). 

     

  2. Answer
    Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1186 posts

    Posted 22 Oct 2018 Link to this post

    Hi Jeremy,

    This is occurring because of a bug in Xamarin.Forms 3.3, we have opened an issue with Microsoft and the Xamarin team has already worked on a fix. You can follow this conversation on GitHub here: https://github.com/xamarin/Xamarin.Forms/issues/4146

    As you mentioned, the only workaround until Xamarin releases an update is to roll back to 3.2.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Desarrollo
    Desarrollo avatar
    11 posts
    Member since:
    May 2011

    Posted 29 Nov 2018 in reply to Lance | Manager Technical Support Link to this post

    Do you know if this is solved on 3.4?
    I'm working with 3.3.0.967583 but when the tab is selected, I get the null on iOS. Android is working good
  4. Desarrollo
    Desarrollo avatar
    11 posts
    Member since:
    May 2011

    Posted 29 Nov 2018 in reply to Desarrollo Link to this post

    I just check the releases notes on 3.3.0.967583 and they said that is fixed but the problem is still there

    https://developer.xamarin.com/releases/xamarin-forms/xamarin-forms-3.3/

    Github #4146 - "iOS: NullReferenceException is thrown when setting the element of the renderer to null after upgrading to 3.3" (#4179)

  5. Yana
    Admin
    Yana avatar
    5030 posts

    Posted 03 Dec 2018 Link to this post

    Hello Ernesto,

    I have just checked the setup with DataGrid that raised the exception with 3.3.0.967583 and it seems resolved.  I have attached my test app, could you download it and test it on your side?  What are the differences from the scenario you have?

    I'm looking forward to your reply.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Desarrollo
    Desarrollo avatar
    11 posts
    Member since:
    May 2011

    Posted 04 Dec 2018 in reply to Yana Link to this post

    Hi Yana, i found that the GroupDescriptor is giving me the null exception

    <telerikGrid:RadDataGrid.GroupDescriptors>
                            <telerikData:PropertyGroupDescriptor PropertyName="**FIELD**"  />
    </telerikGrid:RadDataGrid.GroupDescriptors>

    I comment this code and the app start to work, can you check please

     

  7. Desarrollo
    Desarrollo avatar
    11 posts
    Member since:
    May 2011

    Posted 04 Dec 2018 in reply to Desarrollo Link to this post

    BTW, i'm using xamarin forms 3.3.0.967583 and the Telerik UI for Xamarin R3 2018 (the latest one)
  8. Desarrollo
    Desarrollo avatar
    11 posts
    Member since:
    May 2011

    Posted 04 Dec 2018 in reply to Desarrollo Link to this post

    BTW, i'm using xamarin forms 3.3.0.967583 and the Telerik UI for Xamarin R3 2018 (the latest one)
  9. Desarrollo
    Desarrollo avatar
    11 posts
    Member since:
    May 2011

    Posted 04 Dec 2018 in reply to Yana Link to this post

    Solved! it was a resource declaration on the iOS info.plist
  10. Yana
    Admin
    Yana avatar
    5030 posts

    Posted 05 Dec 2018 Link to this post

    Hi Ernesto,

    Thank you for the follow-up. I am glad to hear you've managed to resolve it.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top