After upgrading my solution to Xamarin Forms 3.0.0.446417 every time I try to open a page that contains a SearchBar control on a UWP application I get an exception.
I'm using the latest version of Visual Studio (15.7.0) and compiling using UWP SDK 16299.
The exception I get is:
System.NullReferenceException: Object reference not set to an instance of an object.
at Xamarin.Forms.Platform.UWP.SearchBarRenderer.OnControlLoaded(Object sender, RoutedEventArgs routedEventArgs)
I have same problems. Rollback to "Xamarin.Forms" Version="2.5.1.527436" helps me. MS VS 2017 (15.6.7) UWP 10.0 (16299-17134)
Same here. too bad we need to rollback now. I really liked 3.0 with new features. can there be quick solution please?
I have just tested again and it looks like that it throws when the page is loaded but if you handle the exception, searchbar is still working. strange behavior
could one of you please attach a small reproduction project. thx
SearchBarTest.zip
Apparently the exception only occurs if the SearchBar is hidden. If the SearchBar is initially visible then there is no exception. I've created a small project that demonstrates this behavior.
I think that it has nothing with visible or hidden because my searchbar is visible but i still get this error.
I can confirm that the exception occurs regardless of whether the SearchBar is visible or not
[Update] Correction; In my case the SearchBar was actually not visible (IsVisible = false) when loading the page, which seems to be the cause of the exception.
Happening here as well. Tried upgrading to 3.1 pre but that had other issues. Rolling back.
Also here....
I suspect the NRE is thrown here https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs#L99
/cc @hartez
@StephaneDelcroix when will we see this fix in a prerelease or stable build?
@tseemann-xematec in the next service-release
@StephaneDelcroix do you know of a schedule date for the next service release?
An urgent hotfix for this issue is badly needed because it's a true blocker. Right now, every Xamarin.Forms app that uses a search bar will crash on UWP and there's no workaround for it.
Is this out there somewhere ? I´ve updated to latest pre, but I still have trouble
@linnkrb it should be in the latest pre and stable, can you add a repo with 3.0.0 so we can take a look.
Tried the lates pre and lates stable, but makes my UWP crash, so rolling back…
Fra: Rui Marinho notifications@github.com
Svar til: "xamarin/Xamarin.Forms" reply@reply.github.com
Dato: tirsdag 5. juni 2018 17:58
Til: "xamarin/Xamarin.Forms" Xamarin.Forms@noreply.github.com
Kopi: Linn Kristin Bjørkli linn.kristin@frontsystems.no, Mention mention@noreply.github.com
Emne: Re: [xamarin/Xamarin.Forms] Exception at Xamarin.Forms.Platform.UWP.SearchBarRenderer.OnControlLoaded after upgrading to 3.0 (#2633)
@linnkrbhttps://github.com/linnkrb it should be in the latest pre and stable, can you add a repo with 3.0.0 so we can take a look.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/xamarin/Xamarin.Forms/issues/2633#issuecomment-394764587, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIxZSiZtT0z1gPGM2C7tS4zPnCC0AnHHks5t5qq0gaJpZM4T28jw.
Most helpful comment
@StephaneDelcroix do you know of a schedule date for the next service release?