Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I have ListView bound to an ObservableCollection. When I add an item to the collection, it crashes hard on iOS, Android is fine:
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (0) beyond bounds (0) for section (0).'
The reason seems to be that I invoke this here in the code-behind:
private void ScrollToBottom()
var lastItem = ChatViewModel.Messages.LastOrDefault();
if (lastItem == null) return;
MessageList.ScrollTo(lastItem, ScrollToPosition.MakeVisible, true);
That wasn't working very well anyway, but crashing the whole app is just rude ;)
Note: I removed the code in question, but if you can't verify, maybe visibility of the control plays into it, too.
Can you upload a reproduction for us to look at?
No repro here - I got rid of all the ListViews in my app and replaced them by a custom solution, sorry.
@Philipp Sumi: Thank you for letting us know! I will close this report for now until we can get further information about it, since we can't know for sure if we've resolved it without a definitive test case to work against. Please feel free to reopen it later or submit another report if you encounter any further issues. Thank you again for your report!