Bug 28796 - Crash on Tab change
Summary: Crash on Tab change
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 1.4.1
Hardware: Macintosh Mac OS
: --- major
Target Milestone: ---
Assignee: Eric Maupin
URL:
Depends on:
Blocks:
 
Reported: 2015-04-06 03:53 UTC by Olexandr
Modified: 2015-06-18 11:10 UTC (History)
5 users (show)

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

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 Olexandr 2015-04-06 03:53:20 UTC
Android application with tabs crashes when user tries to navigate and change tab at the same time. I can reproduce this issue with MobileCRM sample app (https://github.com/xamarin/xamarin-forms-samples/tree/master/MobileCRM). It is hard to reproduce this issue on emulator, but it always crashes on device (I tried Nexus 4 and Samsung Note 4).

Steps for reproduce:
1. Run MobileCRM sample. Navigate to screen with tabs.
2. Open List tab.
3. Tap on list item and while it opens tap on Map tab.

Here is crash log:
[mono] Unhandled Exception:
[mono] System.NullReferenceException: Object reference not set to an instance of an object
[mono]   at Xamarin.Forms.Platform.Android.Platform.CurrentTabbedPageOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00000] in <filename unknown>:0 
[mono]   at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
[mono]   at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in <filename unknown>:0 
[mono]   at Xamarin.Forms.MultiPage`1[Xamarin.Forms.Page].OnPropertyChanged (System.String propertyName) [0x00000] in <filename unknown>:0 
[mono]   at Xamarin.Forms.MultiPage`1[Xamarin.Forms.Page].set_CurrentPage (Xamarin.Forms.Page value) [0x00000] in <filename unknown>:0 
[mono]   at Xamarin.Forms.Platform.Android.Platform+<>c__DisplayClass7.<AddTab>b__5 (System.Object sender, Android.App.TabEventArgs e) [0x00000] in <filename unknown>:0 
[mono]   at Android.App.TabEventDispatcher.OnTabSelected (Android.App.Tab tab, Android.App.FragmentTransaction ft) [0x0000d] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/src/Android.App/ActionBar.cs:89 
[mono]   at Android.App.ActionBar+ITabListenerInvoker.n_OnTabSelected_Landroid_app_ActionBar_Tab_Landroid_app_FragmentTransaction_ (IntPtr jnienv, IntPtr native__this, IntPtr native_tab, IntPtr native_ft) [0x00019] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.ActionBar.cs:1192 
[mono]   at (wrapper dynamic-method) object:acca055a-415e-4629-af3c-58a278d87dcd (intptr,intptr,intptr,intptr)
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform.CurrentTabbedPageOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00000] in <filename unknown>:0 
[mono-rt]   at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
[mono-rt]   at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in <filename unknown>:0 
[mono-rt]   at Xamarin.Forms.MultiPage`1[Xamarin.Forms.Page].OnPropertyChanged (System.String propertyName) [0x00000] in <filename unknown>:0 
[mono-rt]   at Xamarin.Forms.MultiPage`1[Xamarin.Forms.Page].set_CurrentPage (Xamarin.Forms.Page value) [0x00000] in <filename unknown>:0 
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform+<>c__DisplayClass7.<AddTab>b__5 (System.Object sender, Android.App.TabEventArgs e) [0x00000] in <filename unknown>:0 
[mono-rt]   at Android.App.TabEventDispatcher.OnTabSelected (Android.App.Tab tab, Android.App.FragmentTransaction ft) [0x0000d] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/src/Android.App/ActionBar.cs:89 
[mono-rt]   at Android.App.ActionBar+ITabListenerInvoker.n_OnTabSelected_Landroid_app_ActionBar_Tab_Landroid_app_FragmentTransaction_ (IntPtr jnienv, IntPtr native__this, IntPtr native_tab, IntPtr native_ft) [0x00019] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.ActionBar.cs:1192 
[mono-rt]   at (wrapper dynamic-method) object:acca055a-415e-4629-af3c-58a278d87dcd (intptr,intptr,intptr,intptr)
Comment 1 Marian Gieseler 2015-04-18 06:19:45 UTC
I Have exactly the same issue if I change the tabs fast.
Comment 2 karl.kopp 2015-04-26 21:00:48 UTC
I'm getting this crash in a production app and see this error in Insights. Any eta?
Comment 3 Eric Maupin 2015-05-22 18:11:26 UTC
Should be fixed in the next release.
Comment 4 Parmendra Kumar 2015-06-18 11:10:05 UTC
I have checked this issue with xamarin.forms.1.4.3.6364-pre3 and its working fine at my end.

Hence closing this issue.

Environment info:

Xamarin Studio 5.9.3 (build 1)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Mono 4.0.1 ((detached/ed1d3ec)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400010044
Xcode 6.2 (6776)
Build 6C131e
Xamarin.iOS : 8.10.1.64 (Enterprise Edition)
Xamarin.Android : 5.1.3.1 (Enterprise Edition)
Xamarin.Mac : 2.0.1.64 (Enterprise Edition)
Mac OS X 10.9.4