I am using a TabbedPage in my Xamarin.Forms application. I have 7 entries and that means that the "more..." button is displayed on iOS. In the moreNavigationController, there is an edit button that allows reordering of the tabs. But, when I am trying to reorder the tabs items, my app freezes and then crashes... My code is the following:
public class MasterPage : TabbedPage
{
private MasterViewModel ViewModel
{
get { return BindingContext as MasterViewModel; }
}
public MasterPage ()
{
BindingContext = new MasterViewModel ();
Children.Add(new HomeCategoryPage(null, null))
{
Title = "A la une",
Icon = "geography.png",
});
Children.Add(new NavigationPage(new Page())
{
Title = "Rubriques",
Icon = "rubriques.png"
});
Children.Add(newNavigationPage(new Page())
{
Title = "Le Club",
Icon = "leclub.png"
});
Children.Add(new NavigationPage(new Page{Title = "Bookmarks"})
{
Title = "Bookmarks",
Icon = "bookmark.png"
});
Children.Add(new NavigationPage(new Page() { Title = "Alertes" })
{
Title = "Notifications",
Icon = "siren.png"
});
Children.Add(new NavigationPage (new Page(){Title = "My account"})
{
Title = "My account",
Icon = "user.png"
});
Children.Add(new BaseNavigationPage(new Page(){Title = "About"})
{
Title = "About",
Icon = "about.png"
});
And the crash log:
0 libsystem_pthread.dylib 0x000000019611d3a8 _pthread_mutex_lock + 0
1 ImageIO 0x00000001863656e0 CGImageReadGetBytesAtOffset + 80
2 ImageIO 0x000000018636566c CGImageReadSessionGetBytes + 32
3 ImageIO 0x00000001864fcfb8 read_fn + 40
4 ImageIO 0x0000000186366468 png_crc_error + 72
5 ImageIO 0x00000001863663a0 png_crc_finish + 104
6 ImageIO 0x0000000186376924 png_handle_PLTE + 272
7 ImageIO 0x00000001863650cc _cg_png_read_info + 328
8 ImageIO 0x00000001863704b8 copyImageBlockSetPNG + 1992
9 ImageIO 0x000000018636f458 ImageProviderCopyImageBlockSetCallback + 780
10 CoreGraphics 0x00000001853fc060 img_blocks_create + 372
11 CoreGraphics 0x00000001853ed434 img_data_lock + 1288
12 CoreGraphics 0x00000001853ec51c CGSImageDataLock + 136
13 libRIP.A.dylib 0x00000001857a572c ripc_AcquireImage + 768
14 libRIP.A.dylib 0x00000001857a4b00 ripc_DrawImage + 600
15 CoreGraphics 0x00000001853ec24c CGContextDrawImage + 404
16 UIKit 0x00000001899690b0 -[UIImage drawInRect:blendMode:alpha:] + 1396
17 UIKit 0x000000018996888c -[UIImage(UIImagePrivate) _flatImageWithColor:] + 172
18 UIKit 0x0000000189ad0808 -[UIMoreListCellLayoutManager setWidestImageWidthFromViewControllers:] + 212
19 UIKit 0x0000000189ad06a4 -[UIMoreListController _layoutCells] + 148
20 UIKit 0x0000000189c8d498 -[_UIMoreListTableView didMoveToWindow] + 112
21 UIKit 0x0000000189954f10 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1460
22 UIKit 0x000000018997634c -[UIScrollView _didMoveFromWindow:toWindow:] + 64
23 UIKit 0x0000000189954c28 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 716
24 UIKit 0x0000000189954c28 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 716
25 UIKit 0x0000000189954c28 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 716
26 UIKit 0x0000000189954c28 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 716
27 UIKit 0x00000001899542f8 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 140
28 UIKit 0x00000001899541d8 -[UIView(Hierarchy) _postMovedFromSuperview:] + 480
29 UIKit 0x000000018995fcb8 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1760
30 UIKit 0x0000000189a4b9c8 -[UITransitionView transition:fromView:toView:removeFromView:] + 1224
31 UIKit 0x0000000189a8fa38 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1532
32 UIKit 0x0000000189a8f300 -[UITabBarController _setSelectedViewController:] + 356
33 Sept.iOS 0x000000010092c97c wrapper_managed_to_native_ObjCRuntime_Messaging_void_objc_msgSendSuper_IntPtr_intptr_intptr_intptr + 108
34 Sept.iOS 0x00000001008f2fc4 UIKit_UITabBarController_set_SelectedViewController_UIKit_UIViewController + 180
35 Sept.iOS 0x0000000100f71bac Xamarin_Forms_Platform_iOS_TabbedRenderer_set_SelectedViewController_UIKit_UIViewController + 108
36 Sept.iOS 0x0000000100f72fe0 Xamarin_Forms_Platform_iOS_TabbedRenderer_OnPropertyChanged_object_System_ComponentModel_PropertyChangedEventArgs + 496
37 Sept.iOS 0x00000001006d3a98 wrapper_delegate_invoke__Module_invoke_void_object_PropertyChangedEventArgs_object_System_ComponentModel_PropertyChangedEventArgs + 88
38 Sept.iOS 0x000000010006f73c Xamarin_Forms_BindableObject_OnPropertyChanged_string + 220
39 Sept.iOS 0x00000001000f0d7c Xamarin_Forms_MultiPage_1_OnPropertyChanged_string + 1180
40 Sept.iOS 0x00000001000efccc Xamarin_Forms_MultiPage_1_set_CurrentPage_T + 300
41 Sept.iOS 0x0000000100f71a34 Xamarin_Forms_Platform_iOS_TabbedRenderer_UpdateCurrentPage + 820
42 Sept.iOS 0x0000000100f71bc8 Xamarin_Forms_Platform_iOS_TabbedRenderer_set_SelectedViewController_UIKit_UIViewController + 136
43 Sept.iOS 0x0000000100f72fe0 Xamarin_Forms_Platform_iOS_TabbedRenderer_OnPropertyChanged_object_System_ComponentModel_PropertyChangedEventArgs + 496
44 Sept.iOS 0x00000001006d3a98 wrapper_delegate_invoke__Module_invoke_void_object_PropertyChangedEventArgs_object_System_ComponentModel_PropertyChangedEventArgs + 88
45 Sept.iOS 0x000000010006f73c Xamarin_Forms_BindableObject_OnPropertyChanged_string + 220
46 Sept.iOS 0x00000001000f0d7c Xamarin_Forms_MultiPage_1_OnPropertyChanged_string + 1180
47 Sept.iOS 0x00000001000efccc Xamarin_Forms_MultiPage_1_set_CurrentPage_T + 300
48 Sept.iOS 0x0000000100f71a34 Xamarin_Forms_Platform_iOS_TabbedRenderer_UpdateCurrentPage + 820
49 Sept.iOS 0x0000000100f71bc8 Xamarin_Forms_Platform_iOS_TabbedRenderer_set_SelectedViewController_UIKit_UIViewController + 136
50 Sept.iOS 0x0000000100f72fe0 Xamarin_Forms_Platform_iOS_TabbedRenderer_OnPropertyChanged_object_System_ComponentModel_PropertyChangedEventArgs + 496
51 Sept.iOS 0x00000001006d3a98 wrapper_delegate_invoke__Module_invoke_void_object_PropertyChangedEventArgs_object_System_ComponentModel_PropertyChangedEventArgs + 88
52 Sept.iOS 0x000000010006f73c Xamarin_Forms_BindableObject_OnPropertyChanged_string + 220
53 Sept.iOS 0x00000001000f0d7c Xamarin_Forms_MultiPage_1_OnPropertyChanged_string + 1180
54 Sept.iOS 0x00000001000efccc Xamarin_Forms_MultiPage_1_set_CurrentPage_T + 300
55 Sept.iOS 0x0000000100f71a34 Xamarin_Forms_Platform_iOS_TabbedRenderer_UpdateCurrentPage + 820
56 Sept.iOS 0x0000000100f71bc8 Xamarin_Forms_Platform_iOS_TabbedRenderer_set_SelectedViewController_UIKit_UIViewController + 136
57 Sept.iOS 0x0000000100f72fe0 Xamarin_Forms_Platform_iOS_TabbedRenderer_OnPropertyChanged_object_System_ComponentModel_PropertyChangedEventArgs + 496