Any ideas on the following exception we are receiving in a grid with about 1000 rows of data. I believe our specific version is 4_2010_2_1022.
System.OutOfMemoryException crossed a native/managed boundary
Message=Exception of type 'System.OutOfMemoryException' was thrown.
StackTrace:
at MS.Internal.Error.GetXresultForUserException(Exception ex)
at MS.Internal.FrameworkCallbacks.ManagedPeerTreeUpdate(IntPtr oldParentElement, IntPtr parentElement, IntPtr childElement, Byte bIsParentAlive, Byte bKeepReferenceToParent, Byte bCanCreateParent)
at MS.Internal.XcpImports.MethodExNative(IntPtr context, IntPtr element, UInt32 cString, String name, UInt32 cParams, IntPtr pParams, CValue& outval, Int32& typeIndex)
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
at MS.Internal.XcpImports.FrameworkElement_ApplyTemplate(FrameworkElement frameworkElement)
at System.Windows.Controls.ItemContainerGenerator.LayoutStatesManager.GetElementRoot(Boolean templatesAreGenerated)
at System.Windows.Controls.ItemContainerGenerator.LayoutStatesManager.Load()
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InsertNewContainer(Int32 childIndex, UIElement container)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, Int32& childIndex, Size& childSize)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChildren(IItemContainerGenerator generator, Int32 startIndex, Int32 endIndex, Size constraint)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateAndMeasureChildrenForRealizedColumns(Size constraint)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
Edit:
It appears that as users make changes in the grid, internet explorer is gradually using more and more memory until it eventually crashes. We need to isolate this behavior. Please help.
This is happening on multiple systems with both XP and Windows 7, both 32 bit and 64 bit.
Xaml snippet below:
<
UserControl
x:Class
=
"BATC.MPP.SilverlightInterface.Views.BillOfMaterialsView"
mc:Ignorable
=
"d"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:vm
=
"clr-namespace:BATC.MPP.SilverlightInterface.ViewModels"
xmlns:em
=
"clr-namespace:BATC.MPP.Services.Web;assembly=BATC.MPP.Services"
xmlns:riaControls
=
"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
xmlns:riaData
=
"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
xmlns:my
=
"clr-namespace:BATC.MPP.Services.Web;assembly=BATC.MPP.Services"
xmlns:telerikNavigation
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:batc
=
"clr-namespace:BATC.SilverlightSharedLibrary;assembly=BATC.SilverlightSharedLibrary"
d:DesignHeight
=
"600"
d:DesignWidth
=
"1200"
>
<
UserControl.Resources
>
<
vm:BomViewModel
x:Key
=
"BomViewModel"
/>
<
batc:MinDateToEmptyStringConverter
x:Key
=
"MinDateToEmptyStringConverter"
/>
<
telerik:BooleanToVisibilityConverter
x:Key
=
"MyBooleanToVisibilityConverter"
/>
</
UserControl.Resources
>
<
Grid
Name
=
"MainGrid"
DataContext
=
"{Binding Source={StaticResource BomViewModel}}"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"30"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"90*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
x:Name
=
"BomContextMenu"
Opened
=
"BomContextMenu_Opened"
>
<
telerik:RadMenuItem
Header
=
"Add Part"
Command
=
"{Binding AddPart}"
/>
<
telerik:RadMenuItem
Header
=
"Import Parts From File"
Command
=
"{Binding FileUpload}"
/>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"0"
>
<
telerik:RadButton
Content
=
"Add Part"
Name
=
"AddPartButton"
Command
=
"{Binding AddPart}"
Visibility
=
"{Binding IsActive, Converter={StaticResource MyBooleanToVisibilityConverter}}"
Margin
=
"4"
/>
<
telerik:RadButton
Content
=
"Delete Selected Parts"
Name
=
"DeletePartButton"
Command
=
"{Binding DeleteBomPart}"
Visibility
=
"{Binding IsActive, Converter={StaticResource MyBooleanToVisibilityConverter}}"
Margin
=
"4"
/>
<
telerik:RadButton
Content
=
"Import Parts From File"
Name
=
"ImportPartButton"
Command
=
"{Binding Path=FileUpload}"
Visibility
=
"{Binding IsActive, Converter={StaticResource MyBooleanToVisibilityConverter}}"
Margin
=
"4"
/>
<
telerik:RadButton
Content
=
"Export to Excel"
Name
=
"ExportButton"
Click
=
"ExportButtonClick"
Margin
=
"4"
/>
<
telerik:RadButton
x:Name
=
"FindButton"
Content
=
"Find"
Click
=
"FindButtonClick"
Margin
=
"4"
/>
<
telerik:RadButton
x:Name
=
"RefreshButton"
Content
=
"Refresh"
Click
=
"RefreshButtonClick"
Margin
=
"4"
/>
<
sdk:Label
Margin
=
"4"
Content
=
"Selected Proposal:"
/>
<
sdk:Label
Height
=
"22"
Name
=
"CurrentPropName"
Width
=
"410"
Margin
=
"4"
Content
=
"{Binding SelectedProposalPropAndVerName}"
BorderThickness
=
"0"
/>
<
sdk:Label
Height
=
"22"
Name
=
"LoadProgress"
Width
=
"263"
Margin
=
"4"
Content
=
"{Binding LoadProgress}"
BorderThickness
=
"0"
/>
</
StackPanel
>
<
StackPanel
Name
=
"FindPanel"
Orientation
=
"Horizontal"
Visibility
=
"Collapsed"
Grid.Row
=
"1"
Margin
=
"4"
>
<
telerik:RadComboBox
Name
=
"SearchFieldComboBox"
Margin
=
"2"
HorizontalAlignment
=
"Center"
>
<
telerik:RadComboBoxItem
Content
=
"Part #"
IsSelected
=
"True"
/>
<
telerik:RadComboBoxItem
Content
=
"Description"
/>
<
telerik:RadComboBoxItem
Content
=
"Sequence"
/>
<
telerik:RadComboBoxItem
Content
=
"Comm Cd"
/>
<
telerik:RadComboBoxItem
Content
=
"Lifecycle"
/>
<
telerik:RadComboBoxItem
Content
=
"Mfg PN"
/>
<
telerik:RadComboBoxItem
Content
=
"Category"
/>
<
telerik:RadComboBoxItem
Content
=
"Reference #"
/>
</
telerik:RadComboBox
>
<
TextBox
Name
=
"SearchTextBox"
Height
=
"22"
Width
=
"120"
Margin
=
"2"
GotFocus
=
"DescTextBox_GotFocus"
/>
<
telerik:RadButton
Name
=
"FindButtonGo"
Content
=
"Find"
Height
=
"20"
Click
=
"FindButtonGoClick"
Margin
=
"2"
/>
<
telerik:RadButton
Name
=
"CloseFindPanelButton"
Content
=
"x"
Height
=
"20"
Click
=
"CloseFindPanelButtonClick"
HorizontalAlignment
=
"Right"
Margin
=
"2"
/>
<
TextBox
Name
=
"CountTextBox"
Height
=
"22"
Width
=
"220"
Margin
=
"18,2,2,2"
BorderThickness
=
"0"
FontSize
=
"9"
/>
</
StackPanel
>
<
telerik:RadGridView
x:Name
=
"bomGridView"
AutoGenerateColumns
=
"False"
Grid.Row
=
"2"
SelectionMode
=
"Extended"
SelectionUnit
=
"FullRow"
ItemsSource
=
"{Binding Path=BomParts, Source={StaticResource BomViewModel}}"
SelectionChanged
=
"bomGridView_SelectionChanged"
EnableColumnVirtualization
=
"False"
>
<
telerikNavigation:RadContextMenu.ContextMenu
>
<
telerikNavigation:RadContextMenu
Name
=
"ContextMenu"
Opened
=
"ContextMenu_Opened"
>
<
telerikNavigation:RadMenuItem
Name
=
"AddChildPartMenuItem"
Header
=
"Add Child Part"
Command
=
"{Binding AddPart}"
CommandTarget
=
"{Binding ElementName=bomGridView, Path=SelectedItem.Children}"
CommandParameter
=
"child"
/>
<
telerikNavigation:RadMenuItem
Name
=
"EditBomPartMenuItem"
Header
=
"Edit Part"
Click
=
"EditBomPartMenuItemOpen"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Delete"
Name
=
"DeleteMenuItem"
Command
=
"{Binding DeleteBomPart}"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Copy Assy"
Name
=
"CopyMenuItem"
Click
=
"CopyMenuItem_Click"
/>
</
telerikNavigation:RadContextMenu
>
</
telerikNavigation:RadContextMenu.ContextMenu
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Part #"
DataMemberBinding
=
"{Binding Part.PartNumber}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Description"
DataMemberBinding
=
"{Binding Part.Description}"
Width
=
"150"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Indenture"
DataMemberBinding
=
"{Binding IndentureLevel}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Graphic Level"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
sdk:Label
FontFamily
=
"Courier New"
FontSize
=
"13"
Content
=
"{Binding GraphicLevel}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Sequence Number"
IsReadOnly
=
"True"
DataMemberBinding
=
"{Binding SequenceNumber, Mode=TwoWay}"
/>
<
telerik:GridViewDataColumn
Header
=
"WBS"
DataMemberBinding
=
"{Binding WorkBreakdown.WorkBreakdownNumber}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Phase"
DataMemberBinding
=
"{Binding PurchasePhase.PurchasePhaseName}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Qty"
DataMemberBinding
=
"{Binding Qty}"
DataFormatString
=
"{}{0:##.#############}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Total Qty"
DataMemberBinding
=
"{Binding TotalQty, Mode=TwoWay}"
DataFormatString
=
"{}{0:##.###############}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"M/B"
DataMemberBinding
=
"{Binding MakeBuyCd, Mode=TwoWay}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Adj MB"
DataMemberBinding
=
"{Binding MakeBuyCdOverrideValue, Mode=TwoWay}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"PDM Part"
DataMemberBinding
=
"{Binding Part.AgilePartFl}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"As Req"
DataMemberBinding
=
"{Binding AsRequiredFl}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Comm Cd"
DataMemberBinding
=
"{Binding Part.CommodityCode}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Lead Time"
DataMemberBinding
=
"{Binding Part.LeadTime}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Lifecycle"
DataMemberBinding
=
"{Binding Part.Lifecycle}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"L/L"
DataMemberBinding
=
"{Binding Part.LimitedLifeFl}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Mfg PN"
DataMemberBinding
=
"{Binding Part.ManufacturePartNumber}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Category"
DataMemberBinding
=
"{Binding Part.PartCategory}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Ref Num"
DataMemberBinding
=
"{Binding Part.ReferenceNumber}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"U/M"
DataMemberBinding
=
"{Binding Part.UM}"
IsReadOnly
=
"True"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
</
UserControl
>