"Invalid Pointer" -after upgrade to WP7 Mango Toolkit

I started to upgrade my WP7 app Trafiken Sverige to latest version of windows phone "mango" and got caught in an ugly #bug

Basicly what I done was upgraded my project type to 7.1

  • Get latest Toolkit (NuGet)
  • Re-build (Work fine)
  • Run App

Bonk! Failure -hmm after lite investigation I found out it’s my name of controls I added to my templates in longlistselector and wrap panel (se example below).

Simple solution is to remove my"name" in xaml and use "tag" instead.

Works fine!


{"Invalid pointer "}

    [System.NullReferenceException]: {"Invalid pointer "}

    _data: {System.Collections.ListDictionaryInternal}

    _HResult: -2147467261

    _innerException: null

    _message: "Invalid pointer "

    _methodDescs: null

    _optionalData: null

    Data: {System.Collections.ListDictionaryInternal}

    HResult: -2147467261

    InnerException: Could not evaluate expression

    Message: "Invalid pointer "

    StackTrace: Could not evaluate expression



<Grid Margin="{StaticResource PhoneTouchTargetOverhang}">


<ColumnDefinition Width="Auto" />

<ColumnDefinition Width="*"/>

<ColumnDefinition Width="58"/>


<StackPanel Grid.Column="0" VerticalAlignment="Top" Margin="0,18,0,0">                                       

<Image HorizontalAlignment="Stretch">                                       

Tag="{Binding Path=Details.Key}"                                       

Name="{Binding Path=Details.Key}"                                                                                   

Width="160" Source="{Binding Details.Url}"