Q:

App closes when item deleted from long list selector

I've just made a simple app with a longlistseletor, which include an item and an button to delete this item. I think nothing is wrong but each time i delete 4 or 5 items from this list, app always close. Is it because of lack of RAM ?
btw, my english is bad, sorry :P
XAML code:
<phone:LongListSelector ItemsSource="{Binding ItemsIdea}">
    <!-- item quick idea template-->
    <phone:LongListSelector.ItemTemplate>
        <DataTemplate>
            <StackPanel>
                <Grid HorizontalAlignment="Stretch" Margin="0,20,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="10"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle Grid.Column="0" Fill="{StaticResource PhoneAccentBrush}"/>
                    <StackPanel Grid.Column="1">
                        <TextBlock Text="{Binding IdeaContent}" TextWrapping="Wrap" Style="{StaticResource PhoneTextLargeStyle}"/>
                    </StackPanel>
                    <Button Grid.Column="2" Click="btDeleteIdea_Click" BorderThickness="0.0" VerticalAlignment="Top">
                        <Image Source="/Assets/Icons/cancel_small.png"/>                                                
                    </Button>
                </Grid>
            </StackPanel>
        </DataTemplate>
    </phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>

and the C# code:
private void btDeleteIdea_Click(object sender, RoutedEventArgs e) {
    var button = (sender as Button).DataContext as IdeaViewModel;
    if (button != null)
        App.ViewModel.DeleteIdea(button);
}

A:

The problem may be connected with some little bugs in LongListSelector (I'm not aware if they still exist in current version and the version you use).
Here you can find similar problem and the solution is to extend your LLS class. I had similar problem some time ago and this helped:
 public class LongListSelectorExtension : LongListSelector
{
    protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize)
    {
        try { return base.MeasureOverride(availableSize); }
        catch (ArgumentException) { return this.DesiredSize; }
    }
}

You can also look here where are some improvements to LLS code.
Maybe this will help. 

To use your extension you will have to modify your XAML:
Add namespace of your project where the class is at the beginning where other xmlns are:
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:local="clr-namespace:Example" 

Then you should be able to use your class in XAML file instead normal LLS:
 <local:LongListSelectorExtension .../>

