Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

iOS SearchBarRenderer throws a NullReferenceException when the SearchButton redirects to a new page #11865

Closed
cvergaray opened this issue Aug 20, 2020 · 1 comment
Assignees
Labels
a/searchbar e/2 🕑 2 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Milestone

Comments

@cvergaray
Copy link

Description

In cases where the iOS SearchBar OnSearchButtonClicked event handler redirects to a different page, the SearchBarRenderer throws a NullReferenceException.
This only happens on iOS.

Steps to Reproduce

  1. Launch provided app
  2. Type some text into the search bar
  3. Press the "Search" button

Expected Behavior

When navigating to a new page from within an OnSearchButtonClicked event handler, no exceptions are thrown.

Actual Behavior

The application crashes when navigating to a new page from within an OnSearchButtonClicked event handler.

Basic Information

  • Version with issue: 4.8.0.1269
  • Last known good version: Unknown
  • IDE: Visual Studio Enterprise 2019 16.6.5
  • Platform Target Frameworks:
    • iOS: 13.20.2.2
  • Nuget Packages:
    • NETStandard.Library v2.0.3
    • Xamarin.Forms v4.8.0.1269
  • Affected Devices: Suspected all, but tested on iPhone 6, iPhone SE, and iPad Pro

Reproduction Link

SearchBarRendererExceptionDemo.zip

@jsuarezruiz jsuarezruiz added a/searchbar p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛 e/2 🕑 2 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often and removed s/unverified New report that has yet to be verified labels Aug 21, 2020
@jsuarezruiz jsuarezruiz self-assigned this Aug 24, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Aug 24, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 25, 2020
rmarinho added a commit that referenced this issue Aug 26, 2020
…ixes #11865

* Fixed NRE in iOS SearchBarRenderer OnSearchButtonClicked

* Update Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs

Co-authored-by: Rui Marinho <me@ruimarinho.net>

Co-authored-by: Rui Marinho <me@ruimarinho.net>
@samhouts
Copy link
Member

closed by #11897

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/searchbar e/2 🕑 2 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/iOS 🍎 t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants