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

[Bug] Mega repro project for CollectionView issues here #13231

Open
@Tommigun1980

Description

@Tommigun1980

Description

This is a repro project for the numerous CollectionView issues and regressions I have reported as of recently. I decided to make a separate ticket for this so I can refer to it and its instructions in one place. I spent a lot of time working on this and isolating the issues so I would really appreciate if these issues were fixed in a swift manner (as these are holding my app back). The CollectionView has received a lot of solid updates in the latest preview builds but unfortunately also a few regressions, so I hope this could be added to your test suite once the issues have been resolved. Thank you very much!

The repro project can be downloaded here: https://drive.google.com/file/d/1J6tuLyoOwjSIlKBMMT9zJaSpQf_iTcQX/view?usp=sharing

The repro project is very close to a real-life chat application (albeit an ugly one):
4

And contains instructions on how to reproduce the issues:
3

Breakdown

This repro project showcases 7 different bugs. I'll walk through them one at a time, with instructions, screenshots and videos of every issue.

Please note that I only tested this on iOS - I leave it to you to run the below tests on Android also.

Bug 1

Update: Fix should land in #13678 (have not verified this yet).

Xamarin.Forms 5.0.0-pre5 introduced a regression where a CollectionView's contents show up as empty if the IsVisible flag is toggled to True just as contents load. When the repro project is loaded it erroneously shows the following EmptyView in pre5 and later:
1

The above screen will not show once this issue is fixed (and won't show up if downgrading to 5.0.0-pre4).

At this point you can do two things:

  1. Press the 'Send' button, at which point it crashes with NSInternalInconsistencyException:

2

  1. Press 'Reload' which refreshes the CollectionView, which seems to be a workaround for now. Do this to proceed to bugs 2 to 7.

Video of bug 1 is here: https://drive.google.com/file/d/1VgrGcEZejeOVAMpDl9px28Hfaq8Z1jII/view?usp=sharing

This issue is reported at #13126 (comment), which also contains a more limited repro project (but I'd recommend using this repro project instead).

Bug 2

Update: Will also probably get fixed by #13678 (have not verified this yet).

This is a follow-up issue of Bug 1, and was also introduced in 5.0.0-pre5 (this is probably the same issue as Bug 1 but a different manifestation of it).

Once the CollectionView is refreshed by pressing 'Reload', it briefly shows the EmptyView. This lasts only for a fraction of a second, but is very visible as it looks like things are jumping around. This happens while there is data in the CollectionView - for some reason it still quickly displays the EmptyView - so this seems to be a timing issue of sorts.

Video of bug 2 is here (the issue is briefly visible at 10 seconds into the video, just after the spinner vanishes but before the CollectionView's contents are shown): https://drive.google.com/file/d/1ZZ24fXUEhkeneObknoS8o60uiymsGoh6/view?usp=sharing.

Bug 3

Update: Seems to have been fixed by #12919.

The CollectionView jumps around wildly and looks very glitchy when elements are deleted from it. To reproduce, pull left on any of your messages (the ones starting with 'You:') to reveal a SwipeView, and press the delete button. Please note that this is not a 100% repro, the glitch is different depending on your scroll position and the length of the message deleted.

Video of bug 3 is here (it seems to try to scroll to the last element no matter what element is deleted, but often fails to do so either scrolling too little or too much, and the elements themselves also seem to have a glitchy animation): https://drive.google.com/file/d/1vZk60gz7CfDAuHUO69YD9hzJcOCCxGxV/view?usp=sharing

Bug 4

Update: Partially fixed by #12919, but an issue still remains: #13231 (comment).

The CollectionView jumps around wildly and looks very glitchy when elements are added to it. To reproduce, write some text into the entry field and press 'Send'. Please note that this is not a 100% repro, the glitch is different depending on your scroll position and the length of the message added.

Video of bug 4 is here: https://drive.google.com/file/d/1Tp3pMX4havcZAsGTdIK9K-LQi9EsW1Go/view?usp=sharing

Bug 5

Update: Seems to have been fixed by #12919.

Scrolling is often extremely jerky/glitchy after having added a new element. To reproduce, press 'Send' once (and scroll to the end of the list if it doesn't by itself), and then slowly scroll upwards - make small dragging motions where you release the finger - it looks like something is pulling the view down while you scroll up. This is not a 100% repro and may require a few tries.

Video of bug 5 is here (the 'twitch' at 26 seconds into the video is especially visible): https://drive.google.com/file/d/1qfS7wRDVO5AfnoXyhXUH6M1HbW_8t4z4/view?usp=sharing

Bug 6

Update: Not fixed yet, separately tracked in #13547 and #13675.

Even though 'KeepLastItemInView' is used, the CollectionView shows the first elements when data initially becomes available for it. Reproduced by seeing the following when the CollectionView loads (instead of the last message, which would be correct):

6

Bug 7

Update: Have not seen this anymore at all, probably fixed by #12919.

This may have been fixed in 5.0.0-pre6 as I could no longer reproduce it, but it was hard to reproduce after the latest commits in #12919 to begin with, so adding it here to keep an eye out for it. As explained in #12919 (comment), some elements in a CollectionView were cut off in XF build 32817.

The second to last message here shows this error (the speech bubble contains two lines, but only the first is drawn - this was not reproducible with a ListView at the time):
Screenshot 2020-12-26 at 9 02 57

... but it may have been fixed in 5.0.0-pre6. This repro app can be used for validating that this doesn't regress.

Basic Information

  • Version with issue: 5.0.0-pre6
  • Last known good version: For bugs 1 and 2: 5.0.0-pre4. No working version for the rest of the bugs.
  • Platform Target Frameworks:
    • iOS: 14.2
  • NuGet Packages: XF 5.0.0-pre6, Xamarin.FFImageLoading.Forms 2.4.11.982
  • Affected Devices: iOS (please also test all of these on Android, my findings were for iOS this time)

Environment

Show/Hide Visual Studio info
=== Visual Studio Community 2019 for Mac (Preview) ===

Version 8.9 Preview (8.9 build 964)
Installation UUID: f4c2e8d8-481a-4311-847b-759fa99c5218
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000113

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
	Package version: 612000113

=== Roslyn (Language Service) ===

3.9.0-2.20573.18+bc20ce579f9b17c9153f3f54a0690d23c482d899

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.101/Sdks
SDK Versions:
	5.0.101
	5.0.100
	3.1.404
	3.1.403
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	5.0.1
	5.0.0
	3.1.10
	3.1.9

=== .NET Core 3.1 SDK ===

SDK: 3.1.404

=== Xamarin.Profiler ===

Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 11.1.99.218 (Visual Studio Community)
Commit: xamarin-android/master/9bc0003
Android SDK: /Users/tommikiviniemi/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		None installed

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2

Build Information: 
Mono: ac59637
Java.Interop: xamarin/java.interop/master@99897b2
ProGuard: Guardsquare/proguard/v7.0.0@84e8560
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@ab650f5

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/tommikiviniemi/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.9.0.19
Hash: 9771026
Branch: remotes/origin/HEAD
Build date: 2020-11-21 02:03:08 UTC

=== Android Device Manager ===

Version: 16.9.0.13
Hash: bbbb387
Branch: remotes/origin/main
Build date: 2020-11-21 02:03:28 UTC

=== Apple Developer Tools ===

Xcode 12.2 (17535)
Build 12B45b

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.iOS ===

Version: 14.9.0.27 (Visual Studio Community)
Hash: f4c9327fa
Branch: main
Build date: 2020-11-19 10:57:31-0500

=== Xamarin Designer ===

Version: 16.9.0.105
Hash: f693266a2
Branch: remotes/origin/main
Build date: 2020-12-02 05:56:40 UTC

=== Build Information ===

Release ID: 809000964
Git revision: 0ab5ced8f8f39c1837b5879f51401c6fd1ae41ef
Build date: 2020-12-15 08:05:14-05
Build branch: release-8.9
Xamarin extensions: 0ab5ced8f8f39c1837b5879f51401c6fd1ae41ef

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.2.0 Darwin Kernel Version 20.2.0
    Wed Dec  2 20:39:59 PST 2020
    root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

Reproduction Link

The repro project can be downloaded here: https://drive.google.com/file/d/1J6tuLyoOwjSIlKBMMT9zJaSpQf_iTcQX/view?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    a/collectionviewi/highCompletely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less oftenp/1t/bug 🐛

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions