Giter VIP home page Giter VIP logo

Comments (24)

Allough avatar Allough commented on July 17, 2024 2

Thanks @bruzkovsky I spent long enough just finding the issue, I probably would have blown a brain cell trying to find a workaround myself. 👍

from xamarin.forms.

PureWeen avatar PureWeen commented on July 17, 2024 2

It's crashing for me on my iPad. I'll take a look at this one and see what I can figure out

from xamarin.forms.

lor-olo avatar lor-olo commented on July 17, 2024 1

It;s 2020. The latest & greatest VisualStudio, XamForms, etc. This issue (or a similar one) still exists with CollectionView and ObservableCollection. In some scenarios, index out of range occurs -- the same issue as has been reported for 5 years regarding the ListView.

from xamarin.forms.

mattclarkie avatar mattclarkie commented on July 17, 2024

Fairly confident we've seen this too because the symptoms and cause very closely match your description. In our case it's happening with a MasterDetail where the Detail isn't currently visible by the ItemSource of the ListView is updated.

from xamarin.forms.

bruzkovsky avatar bruzkovsky commented on July 17, 2024

@mattclarkie For my case I found a workaround to programmatically show the page before updating the list. Maybe you can to the same with your detail page.

from xamarin.forms.

bruzkovsky avatar bruzkovsky commented on July 17, 2024

@Sokoo92 I added my workaround to the description, hope it can help you out...

Anyhow, will we get an update on this soon? @StephaneDelcroix @jassmith

from xamarin.forms.

samhouts avatar samhouts commented on July 17, 2024

Probably related to #1927

from xamarin.forms.

nbsoftware avatar nbsoftware commented on July 17, 2024

Hit by this bug too even with the latest XF 2.5.1.444934
Workaround from @bruzkovsky indeed works but is ugly.
Any ETA for fixing this?
Thanks

from xamarin.forms.

Mr-Pearce avatar Mr-Pearce commented on July 17, 2024

@nbsoftware I Just tested it with 3.0.0.550146 it works.
Could you confirm?

from xamarin.forms.

bruzkovsky avatar bruzkovsky commented on July 17, 2024

Nope, still reproducible in 3.0.0.550146

Updated Repro:
FormIOSListViewCrashNew.zip

from xamarin.forms.

samhouts avatar samhouts commented on July 17, 2024

@bruzkovsky I have tried all of your attached samples, including the one you provided on your fork (via the Bugzilla ticket), and I cannot get it to crash! I'm wondering if there is another variable that we need to identify. What devices/simulators have you tried recently? What version of VS are you currently on?

from xamarin.forms.

bruzkovsky avatar bruzkovsky commented on July 17, 2024

My IDE version info: https://gist.github.com/bruzkovsky/e16cb0b58f81f8b045a426a2406d68ba

I tried with the iPhone 6s Simulator running iOS 11.2 and on my iPad3 Mini.

Did you follow the steps exactly? You could also try to just tap "Add2" first thing after the app starts.

from xamarin.forms.

nbsoftware avatar nbsoftware commented on July 17, 2024

I can confirm @bruzkovsky's sample does still crash, even with latest XF 3.0.561731.
iPhone 8 Simulator running iOS 11.4

from xamarin.forms.

samhouts avatar samhouts commented on July 17, 2024

@nbsoftware Are you also on VS 2017 15.7.1?

I'm using VS 2017 15.7.2 with Xamarin.iOS 11.10.1.178, building on iOS 11.3 SDK with Xcode 9.3 9E145.

I have followed the instructions exactly with the same simulators, but still no luck! I am also unable to reproduce the errors in #1542 or #1927 anymore, and I believe they all have the same root cause.

from xamarin.forms.

bruzkovsky avatar bruzkovsky commented on July 17, 2024

I updated to VS 2017 15.7.3 with Xamarin-iOS 11.12.0.4 and can still reproduce the crash. Really strange...

Here is the stack trace:
https://gist.github.com/bruzkovsky/ff216b9c7d6604f5792bede97dad6d07

Also tried it directly on the Mac with VS for Mac 7.5.2, stack trace below:
https://gist.github.com/bruzkovsky/9a3fd2aeb6858bd82a4935a621aca924

from xamarin.forms.

6Demon avatar 6Demon commented on July 17, 2024

I still get same issue on iPadAir (did not test on other devices)

from xamarin.forms.

JMLucas96 avatar JMLucas96 commented on July 17, 2024

Same issue on ios 12.1 and iphone simulator XR...

from xamarin.forms.

rdorta avatar rdorta commented on July 17, 2024

Still experiencing same issue with 3.6.0.344457.
Listview binded to ObservableCollection inside a tab page. Throws the same error on the first object added to the collection.

from xamarin.forms.

 avatar commented on July 17, 2024

Same issue here with 4.0.0.425677. ListView inside a Shell Tab. Working without problems on Android.

from xamarin.forms.

PureWeen avatar PureWeen commented on July 17, 2024

@MSiccDev can you try the latest 4.1 pre and if you still have an issue create an issue with a repro?

from xamarin.forms.

 avatar commented on July 17, 2024

@PureWeen before reading your comment, I moved on. I was calling .Clear() on my ObservableCollection(s) before adding new items (as I planned to simply remove items and insert the updated list after that). The collection count was 0, and the error I got indicated that this is a problem on iOS. I moved to a check with .All(vm => vm.Id != whatever.Id), which makes the error disappearing. I am trying to avoid preview packages in the current state as much as I can, but the error happened also with the latest public release of XF. Hope this feedback helps to narrow down the issue.

from xamarin.forms.

LuisDeHaro avatar LuisDeHaro commented on July 17, 2024

@PureWeen, currently using XF version 4.1.0.673156 (latest version) and the issue persists:

Shell Tab App with a CollectionView attached to an Observable Collection.

When calling .Add in my ViewModel the App Crashes:

"UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread."

from xamarin.forms.

bruzkovsky avatar bruzkovsky commented on July 17, 2024

@LuisDeHaro you have to call .Add on the Main Thread, for example by using await Device.InvokeOnMainThreadAsync(() => myObservableCollection.Add(myItem))

from xamarin.forms.

BRICEMARCELKOUADIO avatar BRICEMARCELKOUADIO commented on July 17, 2024

can someone help me i have this same problem.Thanks

from xamarin.forms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.