Unplanned
Last Updated: 08 Mar 2021 10:37 by ADMIN
ProHome
Created on: 15 Dec 2020 10:24
Type: Bug Report
3
OutOfMemory exception is thrown when REST Service storage fails to persist large rendered document

I am rendering a report with multiple large images in PDF. The rendering fails with the following error:

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.IO.MemoryStream.set_Capacity(Int32 value)
   at System.IO.MemoryStream.EnsureCapacity(Int32 value)
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BinaryWriter.Write(Byte[] buffer)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteSingleArray(NameInfo memberNameInfo, NameInfo arrayNameInfo, WriteObjectInfo objectInfo, NameInfo arrayElemTypeNameInfo, Int32 length, Int32 lowerBound, Array array)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
   at Telerik.Reporting.Cache.SerializationUtils.Serialize(Object value)
   at Telerik.Reporting.Services.Engine.PersistableObject.SetObject(String key, Object value)
   at Telerik.Reporting.Services.Engine.DocumentResources.AddResource(RenderingResource resource)
   at Telerik.Reporting.Services.Engine.Rendering.StoreRenderingStream(RenderingStream renderingStream)
   at Telerik.Reporting.Services.Engine.RenderingStream.Finish()
   at Telerik.Reporting.ImageRendering.DocumentPdf.EndDocument()
   at Telerik.Reporting.Writing.DocumentWriter.Telerik.Reporting.BaseRendering.IWriter.WriteEndDocument()
   at Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.EndDocument(Boolean output)
   at Telerik.Reporting.Paging.PageCompositionBase.<>c__DisplayClass110_0.<CreatePageContentOutputTask>b__0()
An error has occurred while rendering the report: System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Telerik.Reporting.Paging.PageCompositionBase.SeparateThreadOutputBehavior.Finish()
   at Telerik.Reporting.Paging.PageCompositionBase.CreatePages()
   at Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, LayoutElement root)
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(LayoutElement root, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback, PageSettings pageSettings)

2 comments
ADMIN
Todor
Posted on: 08 Mar 2021 10:37

Hello Sumi,

Thank you for being ready to cooperate. We will let you know if we need assistance when a developer starts working on the task. You will be automatically notified when the status of the bug report changes.

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ProHome
Posted on: 01 Mar 2021 22:03

Hi Support,

What information do we need to investigate it further? I can provide it all from my end.

Thanks,

Sumi