PushPin Null Reference Exception

May 22, 2009 at 8:58 PM
Edited May 22, 2009 at 9:03 PM

Hi, when I close a VE Map that has VEPushPin's I get a "NullReferenceException" in VSMap.cs (line 766). Is this a bug or is it something specific I should do when creating the PushPin. This is how I create the VEPushPin:

Dim ppPg As New VEPushPin

ppPg.Name ="ppWyoming"

ppPg.Latitude = 43.1586

ppPg.Longitude = -107.42504

ppPg.Altitude = 1000.0

ppPg.AltMode = VEAltMode.FromGround

ppPg.Background = New SolidColorBrush(Colors.Black)

ppLbl.FontSize = 14.0ppPg.Content =  "Wyoming: Northwest Region"

 

myMap.Items.Add(ppPg)

Thanks in advance for your help.

Coordinator
May 23, 2009 at 12:59 AM

Yes, I had found and fixed this bug.  I don't remember if it is included in the latest code checkin, but it will be in the next one definitely.

Thanks,

Josh

Jun 23, 2009 at 2:55 AM

is there a quick fix for this at the moment?

Coordinator
Jun 23, 2009 at 3:49 AM

I think the gist of it was in this section in VEPushPin.cs:

#region Destructors

~VEPushPin()
{
if (this.Map != null)
{
this.Map.RemoveRegisteredPosition(this);
}
}

#endregion

just comment out the contents of the destructor.

Coordinator
Jan 4, 2010 at 8:00 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.