Crash During Profiling
RMD
Posts: 18
I'm profiling a Windows Service that uses the LocalReport class (from Microsoft.Reporting) to render some PDF reports.
My application runs fine without the Profiler attached, but when I attach the Profiler, I get the following exception after 15 to 20 reports have been generated:
My application runs fine without the Profiler attached, but when I attach the Profiler, I get the following exception after 15 to 20 reports have been generated:
Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.ReportingServices.Rendering.ImageRenderer.TextBox.CalculateItemMeasurement(Orientation orientation) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItem.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance) at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render) at Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback, Int32 streamPageNumber) at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) --- End of inner exception stack trace --- at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached) --- End of inner exception stack trace --- at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc) at Microsoft.Reporting.LocalService.RenderWithDataCache(PreviewItemContext itemContext, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IRenderingExtension renderer, ReportProcessing repProc, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup) at Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList& warnings) at Microsoft.Reporting.WinForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) --- End of inner exception stack trace --- at Microsoft.Reporting.WinForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) at Microsoft.Reporting.WinForms.LocalReport.Render(String format, String deviceInfo, CreateStreamCallback createStream, Warning[]& warnings)I have tried all the various profiling modes and all result in a crash.
Comments
Can I just check first - When you say that you have tried it with all the "different profiling modes" are you referring to the Performance Profiler?
It's just that this is the ANTS Memory Profiler forum and there aren't really any modes as such with the memory profiler but the performance profiler has different modes.
Just wanted to clarify before continuing.
Regards,
Stephen
SOrry.
It doesn't look like there's anything in that stack trace from the Profiler that's crashing although it's causing some unknown issue. As a result I doubt there would be anything in our log files but you could send them in just to double check. If you go to the Help menu there's an option to open log file folder.
Send the log files to support@red-gate.com referencing this post.
Is there anyway that you could send a small demo application that replicates the crash? That's often the easiest way to track these down when the app in question is crashing rather than the profiler.
Stephen
Thanks.
Enjoy your weekend and get in touch when it's convenient for you and we will take it from there.
Stephen
1. What we have found that works is disabling the server garbage collector as described here: <http://support.microsoft.com/kb/911716>
Remember- "server GC" actually means multi-core GC.
2. Parametize your main method with:
[System.LoaderOptimization(LoaderOptimization.MultiDomain)]
or
[System.LoaderOptimization(LoaderOptimization.MultiDomainHost)]
If you don't have a main method, for example: if you have a WPF project, take a look at this article which shows you how to do it:
http://www.matthidinger.com/archive/200 ... ation.aspx