xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

[Bug] Crash in iOS's EntryRenderer due to "NSRangeException Reason: Cannot remove an observer ... for the key path "sublayers" from <CALayer 0x600007b11e80> because it is not registered as an observer still present in SR7 #14887

Closed lee-m closed 2 years ago

lee-m commented 2 years ago

See #14804 for more info where this was originally reported.

Unfortunately, the changes in SR7 that added and rejigged the fix for this still hasn't fully fixed the problem and I'm still seeing this crash, albeit in a different place to where it was occurring when I logged #14804 so opening a new issue for this since the original was closed.

lee-m commented 2 years ago

@jfversluis The saga continues :(

Given the amount of people reporting this issue since the original changes were released, and the difficulty in fixing it without breaking other stuff, is it worth simply reverting the original changes from PR #14526? I'd personally rather live with an untinted clear button than a crashing app but it's not my call to make :)

You can see what these changes were trying to resolve in @rotorgames's comment here - https://github.com/xamarin/Xamarin.Forms/pull/14566#issuecomment-924098252

jfversluis commented 2 years ago

It's very strange, I think you confirmed it working in an earlier build right? So I don't see how it broke in the meanwhile, since nothing happened. I agree with you that I think I'll just revert the initial change and be done with it. This is doing more wrong than good :)

lee-m commented 2 years ago

I did test the PR build and it was working for the original report so all seemed good.

What I'm seeing now is the same crash in a different part of the app which I was blocked from reaching before which is just weird. I really don't understand how it was fixed in one place but not another, but then again I didn't understand how the changes fixed the original problem so what do I know! :D

sroyvs commented 2 years ago

We are having the same problem (not 100% sure since what exact version it's been happening, since I do my initial dev on android first) but we are not even using the clear button on the entry boxes, I looks like its always happens when navigating back from a page.

sroyvs commented 2 years ago

After some more testing this issue started occurring after 5.0.0.2125 (both 5.0.0.2196 & 5.0.0.2244), it's very consistent and crashing pretty much on every page in iOS with entry boxes on them (only had time to test iPhone 8 iOS 13.7 simulator). It almost look when it's trying to navigating back to a form that has an entry box on it, and it doesn't matter what the ClearButtonVisibility is set to.

Included the stack trace if it helps

  at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:444 
  at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/runtime/Delegates.generated.cs:392 
  at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)
  at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr)
  at Foundation.NSObject.RemoveObserver (Foundation.NSObject observer, Foundation.NSString keyPath) [0x00020] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/Foundation/NSObject.g.cs:415 
  at Xamarin.Forms.Platform.iOS.EntryRendererBase`1[TControl].Dispose (System.Boolean disposing) [0x000e8] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\EntryRenderer.cs:99 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.ScrollViewRenderer.Dispose (System.Boolean disposing) [0x0002c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ScrollViewRenderer.cs:177 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.DisposeHelpers.DisposeModalAndChildRenderers (Xamarin.Forms.Element view) [0x00042] in D:\a\1\s\Xamarin.Forms.Platform.iOS\DisposeHelpers.cs:23 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00006] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:371 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:593 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child, System.Int32 oldLogicalIndex) [0x00027] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:348 
  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child, System.Int32 oldLogicalIndex) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:847 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0003b] in D:\a\1\s\Xamarin.Forms.Core\Page.cs:498 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:338 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (System.Int32 index) [0x00021] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:182 
  at System.Collections.ObjectModel.Collection`1[T].Remove (T item) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:128 
  at Xamarin.Forms.NavigationPage.Xamarin.Forms.INavigationPageController.RemoveAsyncInner (Xamarin.Forms.Page page, System.Boolean animated, System.Boolean fast) [0x000e7] in D:\a\1\s\Xamarin.Forms.Core\NavigationPage.cs:362 
  at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr)
  at Foundation.NSObject.RemoveObserver (Foundation.NSObject observer, Foundation.NSString keyPath) [0x00020] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/Foundation/NSObject.g.cs:415 
  at Xamarin.Forms.Platform.iOS.EntryRendererBase`1[TControl].Dispose (System.Boolean disposing) [0x000e8] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\EntryRenderer.cs:99 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.ScrollViewRenderer.Dispose (System.Boolean disposing) [0x0002c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ScrollViewRenderer.cs:177 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:91 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:41 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:388 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:196 
  at Xamarin.Forms.Platform.iOS.DisposeHelpers.DisposeModalAndChildRenderers (Xamarin.Forms.Element view) [0x00042] in D:\a\1\s\Xamarin.Forms.Platform.iOS\DisposeHelpers.cs:23 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00006] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:371 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:593 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child, System.Int32 oldLogicalIndex) [0x00027] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:348 
  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child, System.Int32 oldLogicalIndex) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:847 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0003b] in D:\a\1\s\Xamarin.Forms.Core\Page.cs:498 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:338 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (System.Int32 index) [0x00021] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:182 
  at System.Collections.ObjectModel.Collection`1[T].Remove (T item) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:128 
  at Xamarin.Forms.NavigationPage.Xamarin.Forms.INavigationPageController.RemoveAsyncInner (Xamarin.Forms.Page page, System.Boolean animated, System.Boolean fast) [0x000e7] in D:\a\1\s\Xamarin.Forms.Core\NavigationPage.cs:362 
  at Xamarin.Forms.NavigationPage.PopAsyncInner (System.Boolean animated, System.Boolean fast) [0x0004c] in D:\a\1\s\Xamarin.Forms.Core\NavigationPage.cs:336 
  at Xamarin.Forms.NavigationPage.PopAsync (System.Boolean animated) [0x00143] in D:\a\1\s\Xamarin.Forms.Core\NavigationPage.cs:213 

--- Our Code Start --- 
  at Common.Utilities.NavigationHelper+<>c.<PopPageAsync>b__3_0 () [0x0004f] in D:\Development\TFS\MobileApp\Trunk\Common\Utilities\NavigationHelper.cs:28 
  at Common.Utilities.Helpers+<>c__DisplayClass17_0.<InvokeOnMainThread>g__InvokeAction|0 () [0x00047] in D:\Development\TFS\MobileApp\Trunk\Common\Utilities\Helpers.cs:409 
  at Common.Utilities.Helpers.InvokeOnMainThread (System.Func`1[TResult] action) [0x00083] in D:\Development\TFS\MobileApp\Trunk\Common\Utilities\Helpers.cs:423 
  at Common.Utilities.NavigationHelper.PopPageAsync () [0x00039] in D:\Development\TFS\MobileApp\Trunk\Common\Utilities\NavigationHelper.cs:23 
  at Common.Utilities.NavigationHelper.PopPageAsync (Xamarin.Forms.Page page) [0x00044] in D:\Development\TFS\MobileApp\Trunk\Common\Utilities\NavigationHelper.cs:38 
  at Common.UI.Forms.CommonBasePage+<>c__DisplayClass28_1.<InitTitleView>b__4 () [0x0002a] in D:\Development\TFS\MobileApp\Trunk\Common\UI\Forms\CommonBasePage.cs:119 
--- Our Code End --- 

  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:178 
--- End of stack trace from previous location where exception was thrown ---

  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:69 
  at App.iOS.Application.Main (System.String[] args) [0x00001] in D:\Development\TFS\MobileApp\Trunk\App.iOS\Main.cs:12 
TamerIrdais commented 2 years ago

Yes this is still active even on latest XF version 5.0.0.2244, please we need a fix for this issue ASAP.

jfversluis commented 2 years ago

Hey all, so sorry about this, I'm looking to revert the initial changed that caused all this. I will do that tomorrow.

cc: @rotorgames

jfversluis commented 2 years ago

OK, did it now. If the build finishes on that PR, could you all grab the version as per the instructions here and let us know if this fixes this issue? Make sure to get the EXACT version from that PR, as this change will not be in any of the other versions.

Also have an extensive play with it to see if this fixes it for every scenario.

@lee-m I see you have a repro for the original issue, I might have another play with that and see if I can put in a fix, even if it's a try/catch or something, for the initial issue as well

lee-m commented 2 years ago

My original issue from way back with the null reference exception was fixed by the "if (image == null)" check in GetClearButtonTintImage and should still be OK as far as I can tell.

sroyvs commented 2 years ago

@jfversluis thanks for your quick response, I've tested PR build 7844 and it fixes our crashing on iOS issue. As this PR is a revert from your part I can't say what it did to initial issue this was originally trying to fix, but at least the iOS crashing is not present anymore. We will revert to 5.0.0.2125 for the time being until this is released. Thanks again for your help.

jfversluis commented 2 years ago

My original issue from way back with the null reference exception was fixed by the "if (image == null)" check in GetClearButtonTintImage and should still be OK as far as I can tell.

Perfect. It seems that the only thing not working then is indeed the tinting? I can live with that, especially only for older iOS versions which are not very widely used anymore.

@jfversluis thanks for your quick response, I've tested PR build 7844 and it fixes our crashing on iOS issue. As this PR is a revert from your part I can't say what it did to initial issue this was originally trying to fix, but at least the iOS crashing is not present anymore. We will revert to 5.0.0.2125 for the time being until this is released. Thanks again for your help.

Sure thing! Sorry this happened :) should be all good then for the next release!

lee-m commented 2 years ago

My original issue from way back with the null reference exception was fixed by the "if (image == null)" check in GetClearButtonTintImage and should still be OK as far as I can tell.

Perfect. It seems that the only thing not working then is indeed the tinting? I can live with that, especially only for older iOS versions which are not very widely used anymore.

Yep. It's just the tinting which is wonky now. Who'd have thought trying to tint a button could cause so much trouble 😄

jfversluis commented 2 years ago

Yep. It's just the tinting which is wonky now. Who'd have thought trying to tint a button could cause so much trouble 😄

You won't believe the number of simple issues I've seen that turn out to be the hardest ones 😅

guestiapaul commented 2 years ago

Hi,

Are we going to need to wait for SR8 in Dec for this? This NRE has been present in last two releases (SR6 and SR7).

This is a huge problem for us as we are blocked from using SR5 by CollectionView issues fixed in SR6 and SR7 so can't rollback to SR5 without causing even more issues.

jfversluis commented 2 years ago

@guestiapaul I'm afraid so. I'll see what I can do. In the meantime can you confirm that the nightly version indeed fixes the NRE for you?

guestiapaul commented 2 years ago

@jfversluis - tested and working in Build #5.0.0.7844+0-pr.14893.

In the meantime, we've been left with no choice but to revert to 5.0.0.2125. This regression must be affecting a large number of apps so anything you can do before SR8 would be appreciated.

jfversluis commented 2 years ago

@jfversluis - tested and working in Build #5.0.0.7844+0-pr.14893.

In the meantime, we've been left with no choice but to revert to 5.0.0.2125. This regression must be affecting a large number of apps so anything you can do before SR8 would be appreciated.

While not ideal, you can use the nightly feed. That version should build every night (if there are changes) and should ultimately lead up to the next service release version. That one will also have this fix, probably tomorrow because I think I merged it today. You could use that in the meanwhile.

preitzel commented 2 years ago

@jfversluis Are there any news when this bug fix will be released? We are waiting for this for our next app release .. and no, I will not use this pre build 5.0.0.7844 for our final app release

jfversluis commented 2 years ago

@preitzel The next release is planned for around Dec. 15th as you can follow here by our project boards: https://github.com/xamarin/Xamarin.Forms/projects

xleon commented 2 years ago

Still happening in XF 5.0.0.2244

jfversluis commented 2 years ago

@xleon as pointed out, next release it will be fixed. You can try the nightly today to confirm