Random crash with simple app

666
1
03-22-2017 07:59 AM
LucaFongaro
New Contributor

Hi,
I'm new to this sdk and I try to use it through a basic app on Xamarin.iOS. I create a single view app trough Xamarin Studio and I install the nuget package Esri.ArcGISRuntime.Xamarin.iOS.

I add this code in the ViewDidLoad method of the  UIViewController

            _myMapView.TranslatesAutoresizingMaskIntoConstraints = false; //declare this as class field
            View.Add(_myMapView);
            View.AddConstraint(NSLayoutConstraint.Create(_myMapView, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, View, NSLayoutAttribute.Leading, 1, 0));
            View.AddConstraint(NSLayoutConstraint.Create(_myMapView, NSLayoutAttribute.Top, NSLayoutRelation.Equal, View, NSLayoutAttribute.Top, 1, 0));
            View.AddConstraint(NSLayoutConstraint.Create(View, NSLayoutAttribute.Trailing, NSLayoutRelation.Equal, _myMapView, NSLayoutAttribute.Trailing, 1, 0));
            View.AddConstraint(NSLayoutConstraint.Create(View, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, _myMapView, NSLayoutAttribute.Bottom, 1, 0));
                               
             var myMap = new Map(Basemap.CreateImagery());
            _myMapView.Map = myMap;

Nothing more.

I run the app in debug mode on my device (iPhone 5) and simulator.
After the app start I play a bit with the zoom, after some gestures the app simply crash.

I attach the device log I got trough Xcode.

0 Kudos
1 Reply
RichZwaap
Occasional Contributor III

This crash was introduced due to changes in Xamarin's Cycle 9 release.  We have reported it to Xamarin, and they have isolated it and made changes targeted at fixing it (see the Xamarin bug here).  Hopefully, they will release an update with the fix soon.

In the meantime, you can work around this by downgrading your Xamarin installation to the most recent Cycle 8 release.  You can find guidance on downgrading here

0 Kudos