Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException calling MapPins.Clear () (OnCollectionChanged) #36

Closed
marcoseraphin opened this issue Feb 26, 2016 · 0 comments
Closed

Comments

@marcoseraphin
Copy link

Hi,

thanx for the fix concerning SetMapCenter()....no problems here any more.

BUT: I have a new problem in OnCollectionChanged(). I am clearing my MapPins collection and adding a new pin with updated GPS data.

While calling this.MapPins.Clear () a second time I am getting this error:

at TK.CustomMap.iOSUnified.TKCustomMapRenderer.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0014e] in :0
at (wrapper delegate-invoke) :invoke_void_object_NotifyCollectionChangedEventArgs (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/2689/962a0506/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:286 at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionReset () [0x00000] in /Users/builder/data/lanes/2689/962a0506/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:373
at System.Collections.ObjectModel.ObservableCollection1[T].ClearItems () [0x00022] in /Users/builder/data/lanes/2689/962a0506/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:187 at System.Collections.ObjectModel.Collection1[T].Clear () [0x00017] in /Users/builder/data/lanes/2689/962a0506/source/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:87
at VagaBoo.MapViewModel.OnViewAppearing () [0x0002b] in /Users/marcoseraphin/Xamarin/Xamarin/Projekte/VagaBooMobileApp/VagaBooMobileApp (trunk)/VagaBoo/ViewModel/TabPageSetTwo/MapViewModel.cs:87
at XLabs.Forms.Mvvm.BaseView.OnAppearing () [0x00027] in :0
at VagaBoo.Waiting.WaitingPage.OnAppearing () [0x00002] in /Users/marcoseraphin/Xamarin/Xamarin/Projekte/VagaBooMobileApp/VagaBooMobileApp (trunk)/VagaBoo/WaitingPage/WaitingPage.cs:141
at VagaBoo.MapPage.OnAppearing () [0x00002] in /Users/marcoseraphin/Xamarin/Xamarin/Projekte/VagaBooMobileApp/VagaBooMobileApp (trunk)/VagaBoo/Pages/TabPageSetTwo/MapPage.xaml.cs:28
at Xamarin.Forms.Page.SendAppearing () [0x00024] in :0
at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidAppear (Boolean animated) [0x00025] in :0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2689/962a0506/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2689/962a0506/source/maccore/src/UIKit/UIApplication.cs:61
at VagaBoo.iOS.Application.Main (System.String[] args) [0x00008] in /Users/marcoseraphin/Xamarin/Xamarin/Projekte/VagaBooMobileApp/VagaBooMobileApp (trunk)/iOS/Main.cs:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants