-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] iOS 15.4 Crash on CollectionView with Grouping #15230
Comments
Workaround 2 helped me so far. I'm not sure if it has any visual implications yet. |
Workaround 2 also helped me so far. |
Workaround 1 seamed to have helped us. |
Any NON-Workarounds for this issue? Workarounds 1 - 4 will not work for us as the content is variable length based on the number of lines of text for a given content item and whether or not the content item has an image associated with it. Please provide update in this issue. We are on the latest if everything... |
This is an URGENT issue for any developer who has a Xamarin.Forms app in the App Store and the user updates their device iOS 15.4. I remember a time when one of the things Xamarin took pride in and used as a selling point is that they would have SDK's available for any new iOS releases PRIOR to to apple releaseing a new Xcode and/or iOS version... Please fix this issue as soon as possible. The following information appears repeatedly before the crash. Exception that eventually gets thrown at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:441 at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) Translated Report (Full Report Below)Error Report sent to apple after app Crashes Date/Time: 2022-03-26 08:38:08.7281 -0400 Exception Type: EXC_CRASH (SIGABRT) Application Specific Information: Last Exception Backtrace: Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread Thread 1:: Dispatch queue: com.microsoft.app.mam.logging Thread 2:: WebThread Thread 3: Thread 4:: SGen worker Thread 5:: Finalizer Thread 6:: Debugger agent Thread 7:: com.apple.uikit.eventfetch-thread Thread 8:: ProtocolHandler.SendThread Thread 9:: ProtocolHandler.ReadThread Thread 10:: ProtocolHandler.ProcessThread Thread 11:: Timer-Scheduler Thread 12:: tid_15303 Thread 13:: com.apple.NSURLConnectionLoader Thread 14:: Thread Pool I/O Selector Thread 15: Thread 16:: Thread Pool Worker Thread 17:: tid_750b Thread 18:: Thread Pool Worker Thread 19:: Thread Pool Worker Thread 20:: Thread Pool Worker Thread 21:: Thread Pool Worker Thread 22:: Thread Pool Worker Thread 23:: Thread Pool Worker Thread 24:: Thread Pool Worker Thread 25:: Thread Pool Worker Thread 26:: tid_ab07 Thread 0 crashed with X86 Thread State (64-bit): Logical CPU: 0 Binary Images: EOF Full Report{"app_name":"App.iOS","timestamp":"2022-03-26 08:38:20.00 -0400","app_version":"202200325","slice_uuid":"7d51a804-111a-37d0-865c-cb76c52c22a8","build_version":"1.0.29","platform":7,"bundleID":"com.app.dev","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.3 (21E230)","incident_id":"C6F47704-9C86-4EA8-8301-F195FF3ADBDF","name":"App.iOS"} ], ] Model: MacBookPro13,3, BootROM 447.80.3.0.0, 4 processors, Quad-Core Intel Core i7, 2.9 GHz, 16 GB, SMC 2.38f12 |
to be honest using the CollectionView with grouping in my forms app has been a nightmare to me so far (on iOS). There are so many problems that I just seem to have to live with.
|
I was able to Workaround this issue by downgrading my Visual Studio for Mac to the following versions (downgraded in the order shown below): Also using the following NuGet packages: Xamarin.Google.Android.Material: 1.5.0 Xamarin.iOS.MaterialComponents: 92.0.0 === Visual Studio Enterprise 2019 for Mac === Version 8.10.20 (build 0)
=== Mono Framework MDK === Runtime: === Roslyn (Language Service) === 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb === NuGet === Version: 5.9.0.7134 === .NET SDK (x64) === SDK: /usr/local/share/dotnet/sdk/6.0.103/Sdks === .NET Core Runtime === Runtime: /usr/local/share/dotnet/dotnet === .NET Core 3.1 SDK === SDK: 3.1.417 === .NET 5.0 SDK === SDK: 5.0.406 === Xamarin.Profiler === Version: 1.6.13.11 === Updater === Version: 11 === Xamarin Designer === Version: 16.11.0.60 === Xamarin.Android === Version: 12.0.0.3 (Visual Studio Enterprise) SDK Tools Version: 26.1.1 Build Information: === Eclipse Temurin JDK === Java SDK: Not Found === Android SDK Manager === Version: 16.10.0.13 === Android Device Manager === Version: 16.10.0.15 === Apple Developer Tools === Xcode 13.3 (20102) === Xamarin.Mac === Version: 8.6.0.3 (Visual Studio Enterprise) === Xamarin.iOS === Version: 15.6.0.3 (Visual Studio Enterprise) === Build Information === Release ID: 810200000 === Operating System === Mac OS X 12.3.0 === Enabled user installed extensions === NuGet Package Management Extensions 0.27 |
Workaround 2 helped. Thanks for sharing!! It's a predictable thing these days to find some bugs, but it's always great to have at least any workaround. |
I think I am also seeing this issue with crashes on a page with grouping on a CollectionView, unfortunately the work arounds are less then ideal as our cells need to have the ability to resize dynamically. Any idea on a ETA for this fix or if this is getting some high priority? @PureWeen @jfversluis thanks guys! |
Any ETA to fix this? Thanks. |
Hey everyone! It would greatly help to have a ready-to-go reproduction that shows this issue. I see @fedemkr was going to, but didn't add any repro links yet. Thanks! |
@jfversluis see attached sample. On app launch please select the middle top tab item and the app will crash as described in this ticket. |
Any ETA for this? Our app is pretty much broken on a few pages as it just crashes now iOS 15.4 |
We're seeing this issue with the following versions, and haven't tested the versions prior to these: |
Will look into this asap, thanks! |
@jfversluis thank you!! |
We are experiencing the issue as well, on my IPhone SE second gen its not crashing, IPhone 13 crashes. Fixed it by using |
Hi @jfversluis is there any update for this ticket, did you replicate the issue on the provided sample? Oddly if you select the right most tab then the middle you wont encounter an issue but selecting middle tab first on page loaded you will get an exception. |
Thank you to the OP for creating this bug. I spent a while trying to find out what was causing my app to crash before finding this. I'm also using the An update on any progress towards a fix would be much appreciated. |
dup of #15161 |
@LeoJHarris I can definitely reproduce it. But not sure what the fix needs to be yet! |
@jfversluis thank you for the update 👍 |
Hey everyone, thank you for your patience! A PR (#15355) for this is open now, would you be able to grab the NuGet as described here and let us know if this fixes this issue? That will greatly speed up the review process. Make sure that you take the exact version from that PR, any other version on that feed will not have this fix. Besides verifying if this particular issue is fixed also be sure to check other scenarios in the same area to make sure that this fix doesn't accidentally has side-effects 🙂 Thanks! |
@jfversluis can you confirm the build is available on NuGet from that feed? Looks like it might have failed. Latest version is v5.0.0.8189 and not v5.0.0.8190. I was going to check the build in the app we are having issues with and throughout the application. |
I had some issues with the build, sorry about that! Seems version 5.0.0.8198 went through and should be available. |
@jfversluis v5.0.0.8198 appears to have resolved the issue. No longer is the app crashing and no side affects noted. |
@jfversluis tested 5.0.0.8198 with our app on an iPhone 13 simulator, still crashing :/ |
It might be worth mentioned the device I used was iOS 15.4.1 iPhone 6s |
@jfversluis, we display 2 lists that each has its own request. When using 5.0.0.8189 if the top list gets its response first then the two lists display correctly. When the bottom list gets its response first then the heading for the bottom list is displayed in the wrong location. See screen shots. Top list updates first; layout works as desired: Bottom list updates first; header for 2nd list appears immediately below the header for the 1st list: I used the workaround of setting the This is on iOS 15.4.1. But the app doesn't crash any more! |
@krdmllr that seems very curious. Did you completely clean and rebuild and all the things? If yes, I'd love to see some kind of reproduction of that. @StarbuckSapien hm alright, seems like maybe an edge case here that doesn't work nicely with this change then. I'm kind of leaning towards merging this for now for the next release just so we don't have a hard crash anymore at least and figure out something better from there. |
I tested using Xamarin.Forms 5.0.0.8198 in Simulator running iOS 15.4 on an iPhone 11. |
@jfversluis would love to see this in the next release just so we don't continue to see that crashing! 👍 Thanks for keeping this moving for us 😄 |
I experience the same issue. |
@jfversluis I agree that preventing the crash is better than waiting to figure out the issue with header placement, so getting that fix deployed sooner rather than later is a better plan. |
5.0.0.8198 seems to fix the issue for me |
Yep, cleaned bin/obj, uninstalled the old app. I will give it another check but can do that earliest on sunday. |
@jfversluis might there be any ETA for a fix for this in a new release? Thanks! |
XF 5.0.0.2478 is released. This should fix the issue. |
Thanks for the fix, but i still have the crash with the same log if i set a GroupFooterTemplate. But the workaround 2 is working for this case too. |
I had the same issue with a grouped CollectionView and a GridItemsLayout (2 columns). I noticed that either:
solves the crashes. |
Still experiencing the crash as well and attempted suggestions above with no luck. I found another issue and the #13268 (comment) here resolved the crash for me. Example of updating the ObservableCollection with both groups + delay MyObservableCollection.Add(new MyGroup("Name1", myList1));
await Task.Delay(100);
MyObservableCollection.Add(new MyGroup("Name2", myList2)); |
@david-chambers have your tried AddRange instead. |
Add range don’t change anything. Use a delay of 1ms instead of a random one, just after inserting an item or a range of item. That work perfectly |
Thanks @LeoJHarris using AddRange also resolves the crash. |
Don't be fooled, it won't. |
We hope at least in .NET MAUI will get the permanent fix as it is reproducing form Xamarin. Forms 5.0 version, otherwise please mention this known issue in Microsoft docs. Thanks in advance |
Description
Having a
CollectionView
withIsGrouped=True
and theGroupHeaderTemplate
with aBox
that changes its visibility depending a condition (basically something that alters the height of the header dynamically thus resulting on non-fixed height for all headers) results in a crash when appearing or sometimes when scrolling.Exception:
Steps to Reproduce
CollectionView
withIsGrouped=True
and add theGroupHeaderTemplate
with aBox
that has a visibility binding with some logic that, e.g. changes if it's the first itemHeightRequest
seems to fix the issue)Expected Behavior
The app should not crash
Actual Behavior
The app crashes
Basic Information
Environment
Show/Hide Visual Studio info
Reproduction Link
I'll add a PoC as soon as I can.
Workaround
Workaround 1:
Set a fixed height to every cell / GroupHeaderTemplate
Workaround 2:
Set on
CollectionView
->ItemSizeStrategy
toMeasureFirstItem
Workaround 3:
Remove any thing that can cause a dynamic change of height on the
GroupHeaderTemplate
like the visibility binding.Workaround 4:
Remove the grouping and make a plain items collection
The text was updated successfully, but these errors were encountered: