Bug 54120 - Android app with ListView crashes
Summary: Android app with ListView crashes
Status: CONFIRMED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Chris King
URL:
Depends on:
Blocks:
 
Reported: 2017-03-28 13:59 UTC by Milan Laslop
Modified: 2017-11-28 14:17 UTC (History)
14 users (show)

Tags: listview crash ac
Is this bug a regression?: ---
Last known good build:


Attachments
adb logs (4.84 KB, application/x-zip-compressed)
2017-03-28 13:59 UTC, Milan Laslop
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 for Bug 54120 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Milan Laslop 2017-03-28 13:59:05 UTC
Created attachment 20953 [details]
adb logs

git clone https://github.com/milan11/xamarin_forms_list_test

Nexus 6 with Android 7.0
Xamarin Forms 2.3.3.193

Open in debug mode from Visual Studio.

Do this repeatedly (fast):
- click "Go to list" button
- press back
(you should be able to reproduce it after doing this max. 20 times)

The app crashes (with the "App has stopped" dialog).

Logcat log: log_assertion

This is maybe interesting:
Abort message: '* Assertion at /Users/builder/data/lanes/4009/3a62f1ea/source/mono/mono/metadata/sgen-tarjan-bridge.c:1139, condition `xref_count == xref_index' not met'

In Visual Studio - Output:
F/        ( 1709): * Assertion at /Users/builder/data/lanes/4009/3a62f1ea/source/mono/mono/metadata/sgen-tarjan-bridge.c:1139, condition `xref_count == xref_index' not met
F/libc    ( 1709): Fatal signal 6 (SIGABRT), code -6 in tid 1709 (App4.Android)

With Xamarin Forms 2.3.5.74-nightly or with another device (android-x86.org Android 7 build running on VMWare) I observed another behavior:
- app simply disappeared (no "App has stopped" dialog)
- no "Abort message" in the log: log_other

Some sort of crashes can be reproduced in Release builds, too.
Comment 1 Paul DiPietro [MSFT] 2017-03-28 14:37:51 UTC
I was able to get an emulator to crash though it took more than 20 attempts and I had alt-tabbed away from it for a moment as well. There's no explicit mention of Forms in those logs that I can see, so it may or may not be a Forms-specific issue, but I will leave it filed under this and confirmed for the time being until it's further investigated.
Comment 2 Chris King 2017-03-28 15:56:08 UTC
The assert is fired from the runtime. Typically, an assert indicates a bug in the component from which it was fired and not the client of the component. So let's ask the mono team if they believe this indicates a bug in their code or ours.
Comment 3 stefan.schnablegger 2017-04-01 15:26:44 UTC
I am having the same issue while navigating the Detail Page from the Master Page. 

http://stackoverflow.com/questions/42990427/xamarin-forms-masterdetail-page-navigation-causing-crash-on-android-fatal-signa

I have a sample app here. 

https://bitbucket.org/schnabs/clubapp_42990427
Comment 4 NowOnline 2017-04-07 11:29:10 UTC
I'm having the same issue.

I'm using Xamarin 4.3.0.784 for Visual Studio with Xamarin.Forms 2.3.4.224. I'm also using a ListView inside the DetailPage from a MasterPage, like the case above.
Comment 5 n.v.biryukov 2017-05-09 08:29:19 UTC
Chris King, what does "let's" mean?
Did you ask the mono team about it, or should some of us ask?

Btw started to have this as well at BQ Aquaris U running 6.0.1 when moved my listview itemsource to viewmodel and updating the list periodically via binding.
My ListView is in MasterDetail which has Navigation page as detail and on this page root I have a listview.
Only appears in debug mode.
Before I updated the list through events and was also setting listview.Itemsource to null before passing the real itemSource (as I had a bug where half-transparent cells are overlaying each other) and didn't have that.
Comment 6 Stéphane Mathis 2017-06-01 07:36:34 UTC
I have the same issue with a non-Forms app.
I have a ListView that directs to another activity with various EditText.

If I go back and forth multiple times, it crashes.
Comment 7 Stéphane Mathis 2017-06-01 11:48:11 UTC
I have more info on this. It might be linked to ReactiveUI.
I have opened an issue on their GitHub page : https://github.com/reactiveui/ReactiveUI/issues/1379

A sample project is included.
Comment 8 appie 2017-07-26 12:28:19 UTC
Any news about this bug? I have the same problem
Comment 9 Daniel Vaughan 2017-11-28 14:17:15 UTC
I experienced the same issue until I added an Android environment file as described here and used the 'old' GC Bridge:
https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.3/#Known_Issues