Crash During Profiling

Code profiling for .NET Developers

Moderators: Bart Read, StephenC, Alex.Davies, AndrewH

Crash During Profiling

Postby RMD » Thu Jul 02, 2009 9:09 pm

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:
Code: Select all
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.
RMD
 
Posts: 13
Joined: Thu Jan 29, 2009 5:50 pm

Postby StephenC » Thu Jul 02, 2009 9:15 pm

Hi,

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
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby RMD » Thu Jul 02, 2009 9:17 pm

Whoops. You're correct. I meant to post this in the ANTS Performance Profiler forum. Can somebody move it for me, or should I just repost.

SOrry.
RMD
 
Posts: 13
Joined: Thu Jan 29, 2009 5:50 pm

Postby StephenC » Thu Jul 02, 2009 9:19 pm

I'll move it. :D

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
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby RMD » Thu Jul 02, 2009 9:31 pm

I'll send the log file. I might be able to create a demo app, but not until after the holiday weekend.

Thanks.
RMD
 
Posts: 13
Joined: Thu Jan 29, 2009 5:50 pm

Postby StephenC » Thu Jul 02, 2009 9:36 pm

The ANTS team are on a day out tomorrow so that works out quite well. :)

Enjoy your weekend and get in touch when it's convenient for you and we will take it from there.

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby Chris.Allen » Mon Sep 21, 2009 3:40 pm

We now have two workarounds for crashes:

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
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Performance Profiler 5

Who is online

Users browsing this forum: No registered users and 0 guests