-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RazorEngine System.OutOfMemoryException #77
Comments
Check that your report models do not return a huge amount of data. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I have a problem when generating reports with SealLibrary. Compiling Razor views seems to be a problem (see below).
Our architecture:
When we execute directly the ReportBuilder project in debug mode from VS (or call the ReportBuilder.exe via cmd), the reports are well generated.
Do you have an idea ?
Many thanks for your help.
Pierre
2023-01-12 17:44:32.6537|0|ERROR|ReportBuilder.ReportLauncher|BuildReport|Error: System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
at System.Runtime.InteropServices.Marshal.AllocHGlobal(Int32 cb)
at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Boolean isFileStream, Int64 start, Int32 size)
at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size)
at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.SelectMetadataReference.Visit(Assembly assembly)
at RazorEngine.Compilation.ReferenceResolver.CompilerReference.DirectAssemblyReference.Visit[T](ICompilerReferenceVisitor
1 visitor) at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.<>c.<GetMetadataReferences>b__8_0(CompilerReference reference) at System.Linq.Enumerable.SelectListIterator
2.ToArray()at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source) at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.GetMetadataReferences(IEnumerable
1 references)at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Net.Report.Builder.ReportBuilderBase.AddHeader(PdfConverter converter)
at Net.Report.Builder.ReportBuilderBase.SetPdfConfiguration(PdfConverter converter)
at Net.Report.Builder.ReportBuilderBase.GeneratePDFResult()
at Net.Report.Builder.ReportBuilderBase.GenerateReport(ReportFormat format)
at ReportBuilder.Reports.ReportGenerator.GenerateReport(IReportBuilder reportBuilder, Parameters parameters) in C:\dev\ReportBuilder\Reports\ReportGenerator.cs:line 66
at ReportBuilder.Reports.ReportGenerator.Generate(Parameters parameters) in C:\dev\ReportBuilder\Reports\ReportGenerator.cs:line 24
The text was updated successfully, but these errors were encountered: