Skip to Content
0
Former Member
Sep 29, 2011 at 06:45 PM

System.OutOfMemoryException

140 Views

We consistently receive errors viewing reports with the WPF viewer, that contain pictures.

The images may be as large as 3.5 MB. The reports may contain more than one image.

The call stack is below.

Type : System.OutOfMemoryException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Insufficient memory to continue the execution of the program.

Source : PresentationCore

Help link :

Data : System.Collections.ListDictionaryInternal

TargetSite : Void InitFromMemoryPtr(Int32, Int32, Double, Double, System.Windows.Media.PixelFormat, System.Windows.Media.Imaging.BitmapPalette, IntPtr, Int32, Int32)

Stack Trace : at System.Windows.Media.Imaging.CachedBitmap.InitFromMemoryPtr(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette, IntPtr buffer, Int32 bufferSize, Int32 stride)

at SAPBusinessObjects.WPF.ViewerShared.WPFUtils.DrawGDIBitmap(DrawingContext context, Bitmap bitmap, Rect rect)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawImageInstance(ImageObjectInstance imageObjectInstance, VisualCollection visuals)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawReportObjectInstance(ReportObjectInstance instance, VisualCollection visuals, Rect sectionClipRect)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawSectionInstance(SectionInstance section, VisualCollection visuals)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawSubreportObjectInstance(SubreportObjectInstance subreportObjectInstance, VisualCollection visuals)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawReportObjectInstance(ReportObjectInstance instance, VisualCollection visuals, Rect sectionClipRect)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawSectionInstance(SectionInstance section, VisualCollection visuals)

at SAPBusinessObjects.WPF.ViewerShared.PageRender.Render(VisualCollection visuals)

at SAPBusinessObjects.WPF.ViewerShared.PageView.Render()

at SAPBusinessObjects.WPF.ViewerShared.PageView.PageView_SizeChanged(Object sender, SizeChangedEventArgs e)

at System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)

at System.Windows.ContextLayoutManager.fireSizeChangedEvents()

at System.Windows.ContextLayoutManager.UpdateLayout()

at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()

at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()