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

[Bug] Crash in ButtonRenderer on iOS #13136

Closed
samtun opened this issue Dec 14, 2020 · 2 comments · Fixed by #13137
Closed

[Bug] Crash in ButtonRenderer on iOS #13136

samtun opened this issue Dec 14, 2020 · 2 comments · Fixed by #13137
Assignees
Labels
a/button 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

Comments

@samtun
Copy link

samtun commented Dec 14, 2020

Description

The ButtonRenderer crashes on iOS in version 4.8.0.1269 because the Element is null (probably disposed).
There was a similar related issue once before #11664 that got fixed in #11668.
But it was reintroduced with 3a57e2e because the Element is not checked for null there.

Steps to Reproduce

  1. Scroll fast in a ListView with button elements

Expected Behavior

no crash

Actual Behavior

The app crashes with the following stack trace:

System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Platform.iOS.ButtonRenderer.LayoutSubviews () [0x0001b] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ButtonRenderer.cs:89 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at Miele.Sandbox.iOS.Application.Main (System.String[] args) [0x00001] in /Users/fschipp/Projects/miele.modules.recipes/Sandbox/Sandbox.iOS/Main.cs:12 

Basic Information

  • Version with issue: 4.8.0.1269
  • Last known good version: 4.7
  • Platform Target Frameworks:
    • iOS: any

Workaround

No workaround

@samtun samtun added s/unverified New report that has yet to be verified t/bug 🐛 labels Dec 14, 2020
@samhouts samhouts added this to New in Triage Dec 14, 2020
@jsuarezruiz jsuarezruiz added a/button i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often p/iOS 🍎 labels Dec 14, 2020
@jsuarezruiz jsuarezruiz self-assigned this Dec 14, 2020
@jsuarezruiz jsuarezruiz added e/2 🕑 2 and removed s/unverified New report that has yet to be verified labels Dec 14, 2020
@jsuarezruiz jsuarezruiz moved this from New to Ready For Work in Triage Dec 14, 2020
@jsuarezruiz jsuarezruiz added the in-progress This issue has an associated pull request that may resolve it! label Dec 14, 2020
Triage automation moved this from Ready For Work to Closed Dec 15, 2020
rmarinho pushed a commit that referenced this issue Dec 15, 2020
* Fix NRE in iOS ButtonRenderer

* Protected from NRE in more renderers
@samtun
Copy link
Author

samtun commented Jan 4, 2021

Will this be merged into any 4.8 service release?

@MitchBomcanhao
Copy link

@samtun could you add which specific 4.8 version you found the issue on? "latest 4.8 version" isn't entirely clear when reading this retrospectively...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/button 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
Triage
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants