Bug 28345 - Android crash on listview press hold and swipe
Summary: Android crash on listview press hold and swipe
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-23 18:22 UTC by Wessel Oosthuizen
Modified: 2015-04-23 10:41 UTC (History)
5 users (show)

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


Attachments
Listviewapp (1.42 MB, application/octet-stream)
2015-03-24 13:53 UTC, Atin
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 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.

Related Links:
Status:
VERIFIED FIXED

Description Wessel Oosthuizen 2015-03-23 18:22:37 UTC
When I press and hold a listview item, then swipe my finger, the app crashes with following exception.  I do not have any context items set for the listview, and I'm using a samsung galaxy s3 with latest pre-release of forms:


03-23 18:20:43.185 E/mono-rt (25359): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
03-23 18:20:43.185 E/mono-rt (25359):   at Android.Widget.AdapterView+IOnItemLongClickListenerInvoker.n_OnItemLongClick_Landroid_widget_AdapterView_Landroid_view_View_IJ (IntPtr jnienv, IntPtr native__this, IntPtr native_parent, IntPtr native_view, Int32 position, Int64 id) [0x00019] in /Users03-23 18:20:43.185 E/mono-rt (25359):   at Xamarin.Forms.Platform.Android.CellAdapter.set_ContextView (Android.Views.View value) [0x00000] in <filename unknown>:0 
03-23 18:20:43.185 E/mono-rt (25359):   at Xamarin.Forms.Platform.Android.CellAdapter.HandleContextMode (Android.Views.View view, Int32 position) [0x00000] in <filename unknown>:0 
03-23 18:20:43.185 E/mono-rt (25359):   at Xamarin.Forms.Platform.Android.CellAdapter.OnItemLongClick (Android.Widget.AdapterView parent, Android.Views.View view, Int32 position, Int64 id) [0x00000] in <filename unknown>:0 
03-23 18:20:43.185 E/mono-rt (25359):   at Android.Widget.AdapterView+IOnItemLongClickListenerInvoker.n_OnItemLongClick_Landroid_widget_AdapterView_Landroid_view_View_IJ (IntPtr jnienv, IntPtr native__this, IntPtr native_parent, IntPtr native_view, Int32 position, Int64 id) [0x00019] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/9e05e39f/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Widget.AdapterView.cs:337 
03-23 18:20:43.185 E/mono-rt (25359):   at (wrapper dynamic-method) object:fd68d948-b290-4ead-babd-61762e303367 (intptr,intptr,intptr,intptr,int,long)
Comment 1 Atin 2015-03-24 13:52:29 UTC
I have checked this issue and unable to reproduce the above behavior given in the bug description.When I press and hold listview item,then swipe my finger app does not crashes.

However, when I press and hold listview item, then swipe my finger and again press on another listview item then app crashes with the following exception:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object

Screencast: http://www.screencast.com/t/XhspWiwNym
Application output: https://gist.github.com/Arpit360/b1b742cfd18075eefcdb
XVS Logs: https://gist.github.com/Arpit360/457ea5c7bf1102722db5
Device Logs: https://gist.github.com/Arpit360/6c1aa30d6af84fa0800b

Xamarin.Forms:1.4.1.6347-pre2

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional


Xamarin   3.9.534.0 (bb0518b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.38 (38ac51a9d0866c7726a7484d82632c82c8221594)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.8.1.0 (61fa2c6e0f2ef51eb98b8810de13b4469f379cc7)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 2 Atin 2015-03-24 13:53:42 UTC
Created attachment 10472 [details]
Listviewapp
Comment 3 Jason Smith [MSFT] 2015-04-09 16:52:42 UTC
Should be fixed in 1.4.3-pre1
Comment 4 Parmendra Kumar 2015-04-23 10:41:04 UTC
I have checked this issue with Xam.Forms 1.4.3-pre1 and the 'WorkingwithListview' app is not getting crash.

Device info: Samsung Galaxy S5, Android version 5.0

Environment info:
=== Xamarin Studio ===

Version 5.9 (build 434)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 4.0.0 ((detached/fd35b80)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000145

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.0.266 (Enterprise Edition)
Hash: c8648f0
Branch: master
Build date: 2015-04-21 12:22:24-0400

=== Xamarin.Android ===

Version: 5.1.0.115 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.0.266 (Enterprise Edition)

=== Build Information ===

Release ID: 509000434
Git revision: 1291dafc0e3477de3999eb2019517f7dc181e443
Build date: 2015-04-22 18:34:20-04
Xamarin addins: 21fd95f743742c5237e22023996c2800ce3f8db3

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64