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

[Bug] Xamarin.Forms.Platform.iOS.EntryRendererBase`1[TControl].GetClearButtonTintImage crash #14510

Closed
AndreasReitberger opened this issue Aug 15, 2021 · 2 comments
Labels
a/entry p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛

Comments

@AndreasReitberger
Copy link

Description

Using iOS 13 on an iPhone 8 simulator leads to following crash while using entry box with ClearButtonVisibility to set "WhileEditing".

<Entry 
      Grid.Column="1"
      Placeholder="{x:Static localization:Strings.SettingsPrintServerConnectionAddress}"
      Text="{Binding ServerAddress, Mode=TwoWay}" 
      Style="{StaticResource DefaultBorderlessEntry}"
      ClearButtonVisibility="WhileEditing"
      Margin="16,2,16,4"
      />

Newer iOS versions are working fine.

Steps to Reproduce

  1. Setup an iPhone 8 simulator running iOS 13.1
  2. Insert the xaml code above
  3. See the exception

Expected Behavior

No exception.

Actual Behavior

Exception gets thrown.
exc {System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.Forms.Platform.iOS.EntryRendererBase1[TControl].GetClearButtonTintImage (UIKit.UIImage image, UIKit.UIColor color) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iO…}
`

Basic Information

  • Version with issue: SR4
  • Platform Target Frameworks:
    • iOS: iOS 13.1 on iPhone 8 (Simulator and real device)
  • Affected Devices: iPhone 8 (Simulator / real device)

Stacktrace

Xamarin.Forms.Platform.iOS.EntryRendererBase1[TControl].GetClearButtonTintImage (UIKit.UIImage image, UIKit.UIColor color) [0x00000] in D:\\a\\1\\s\\Xamarin.Forms.Platform.iOS\\Renderers\\EntryRenderer.cs:591 \n at Xamarin.Forms.Platform.iOS.EntryRendererBase…"

Workaround

@AndreasReitberger AndreasReitberger added s/unverified New report that has yet to be verified t/bug 🐛 labels Aug 15, 2021
@AndreasReitberger
Copy link
Author

Seems to be related to: #14479

@jfversluis
Copy link
Member

Fixed with #14479

jfversluis added a commit that referenced this issue Nov 16, 2021
jfversluis added a commit that referenced this issue Nov 16, 2021
* Revert "Fix hangs and NREs with Entry Observer (#14859)"

This reverts commit 5188c4f.

* Revert "Refactor observer lifecycle (#14828)"

This reverts commit f95f671.

* Revert "Fix crashing on iOS < 14 if ClearButtonVisibility = WhileEditing in Entry (#14479 #14510) (#14526)"

This reverts commit a21b36a.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/entry p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants