Bug 35606 - Polygon object in Mapbox does not initialize
Summary: Polygon object in Mapbox does not initialize
Status: RESOLVED FIXED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jon Dick
URL:
Depends on:
Blocks:
 
Reported: 2015-11-05 19:07 UTC by k.a.shah
Modified: 2015-12-01 16:04 UTC (History)
1 user (show)

Tags:
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:
RESOLVED FIXED

Description k.a.shah 2015-11-05 19:07:48 UTC
Code: 
nuint pointCount = 1;
			CLLocationCoordinate2D coordinates = new CLLocationCoordinate2D (latitude, longitude);
			Polygon p = Polygon.WithCoordinates (coordinates, pointCount);
			mapView.AddAnnotation (p);

StackTrace: 
2015-11-05 18:06:56.845 MapboxSampleiOS[4126:1176073] critical:   at <unknown> <0xffffffff>
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at (wrapper managed-to-native) ApiDefinition.Messaging.IntPtr_objc_msgSend_CLLocationCoordinate2D_nuint (intptr,intptr,CoreLocation.CLLocationCoordinate2D,System.nuint) <IL 0x00030, 0xffffffff>
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at Mapbox.Polygon.WithCoordinates (CoreLocation.CLLocationCoordinate2D,System.nuint) <IL 0x00011, 0x00093>
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at MapBoxSampleiOS.ViewController/<ViewDidLoad>c__async0.MoveNext () [0x00232] in /Users/khyati/Downloads/mapboxsdk-2.1.2/samples/MapboxSampleiOS/MapboxSampleiOS/ViewController.cs:51
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.InvokeMoveNext (object) [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1076
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x00027] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Threading/ExecutionContext.cs:242
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Threading/ExecutionContext.cs:228
2015-11-05 18:06:56.846 MapboxSampleiOS[4126:1176073] critical:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.Run () [0x0003b] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1057
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.AwaitTaskContinuation.InvokeAction (object) [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:753
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&) [0x00017] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:784
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run (System.Threading.Tasks.Task,bool) [0x00016] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:424
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.Task.FinishContinuations () [0x0008c] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:3668
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.Task.FinishStageThree () [0x00045] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2387
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.Task`1.TrySetResult (TResult) [0x00058] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Future.cs:488
2015-11-05 18:06:56.847 MapboxSampleiOS[4126:1176073] critical:   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult (TResult) [0x0001f] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:568
2015-11-05 18:06:56.848 MapboxSampleiOS[4126:1176073] critical:   at MapBoxSampleiOS.CustomHttpUtility/<SecureGetRequestAsync>c__async1.MoveNext () [0x00109] in /Users/khyati/Downloads/mapboxsdk-2.1.2/samples/MapboxSampleiOS/MapboxSampleiOS/CustomHttpUtility.cs:132
2015-11-05 18:06:56.848 MapboxSampleiOS[4126:1176073] critical:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.InvokeMoveNext (object) [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1076
2015-11-05 18:06:56.848 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x00027] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Threading/ExecutionContext.cs:242
2015-11-05 18:06:56.848 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Threading/ExecutionContext.cs:228
2015-11-05 18:06:56.848 MapboxSampleiOS[4126:1176073] critical:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.Run () [0x0003b] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1057
2015-11-05 18:06:56.848 MapboxSampleiOS[4126:1176073] critical:   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.<s_postCallback>m__0 (object) [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:393
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at UIKit.UIKitSynchronizationContext/<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/src/UIKit/UIKitSynchronizationContext.cs:24
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/src/Foundation/NSAction.cs:163
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0005e, 0xffffffff>
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at <unknown> <0xffffffff>
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x000ae, 0xffffffff>
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/src/UIKit/UIApplication.cs:77
2015-11-05 18:06:56.849 MapboxSampleiOS[4126:1176073] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/src/UIKit/UIApplication.cs:61
2015-11-05 18:06:56.850 MapboxSampleiOS[4126:1176073] critical:   at MapBoxSampleiOS.Application.Main (string[]) [0x00008] in /Users/khyati/Downloads/mapboxsdk-2.1.2/samples/MapboxSampleiOS/MapboxSampleiOS/Main.cs:12
2015-11-05 18:06:56.850 MapboxSampleiOS[4126:1176073] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00060, 0xffffffff>
2015-11-05 18:06:56.850 MapboxSampleiOS[4126:1176073] critical:
Comment 1 Jon Dick 2015-12-01 16:04:44 UTC
This will be fixed in the 3.0.0 release of the component (fixed in xamarin/components/master by 7e50f319bf)

The problem was that the coordinates parameter should have been an array instead of a single instance.