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-09-29 13:58 UTC (History)
13 users (show)

See Also:
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

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

Note You need to log in before you can comment on or make changes to this bug.