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

If the element's renderer has already been nulled or disposed, request zero space for it #12114

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Sep 14, 2020

Description of Change

While we still can't seem to reproduce #10801 under controlled conditions to find a root cause, it's clear that it's occurring when the platform attempts to measure a renderer which has already been disposed. These changes add a disposal check before rendering to avoid crashing; if the renderer has already been disposed, the method returns a size of zero.

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

Still can't reproduce the issue locally, so no tests at the moment.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@jsuarezruiz
Copy link
Contributor

It is not the root of the problem, but it makes sense to avoid some disposed exceptions.

@PureWeen PureWeen merged commit 536ea6e into 4.8.0 Sep 16, 2020
@PureWeen PureWeen deleted the fix-10801 branch September 16, 2020 00:38
@samhouts samhouts added 4.4.0 regression on 4.4.0 a/collectionview a/fastrenderers a/label a/listview Problems with the ListView/TableView feedback-ticket Issue originates from https://developercommunity.visualstudio.com i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often i/regression t/bug 🐛 labels Sep 16, 2020
@samhouts samhouts added this to the 5.0.0 milestone Sep 19, 2020
thisisthekap pushed a commit to thisisthekap/Xamarin.Forms that referenced this pull request Oct 1, 2020
@samhouts samhouts modified the milestones: 5.0.0, 4.8.0 Oct 5, 2020
thisisthekap pushed a commit to thisisthekap/Xamarin.Forms that referenced this pull request Oct 7, 2020
jfversluis added a commit that referenced this pull request Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.4.0 regression on 4.4.0 a/collectionview a/fastrenderers a/label a/listview Problems with the ListView/TableView feedback-ticket Issue originates from https://developercommunity.visualstudio.com i/critical i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often i/regression m/high impact ⬛ p/Android t/bug 🐛
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants