Red Gate forums :: View topic - Crash During Profiling
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 5
ANTS Performance Profiler 5 forum

Crash During Profiling

Search in ANTS Performance Profiler 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
RMD



Joined: 29 Jan 2009
Posts: 13

PostPosted: Thu Jul 02, 2009 9:09 pm    Post subject: Crash During Profiling Reply with quote

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:

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.
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Thu Jul 02, 2009 9:15 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
RMD



Joined: 29 Jan 2009
Posts: 13

PostPosted: Thu Jul 02, 2009 9:17 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Thu Jul 02, 2009 9:19 pm    Post subject: Reply with quote

I'll move it. Very Happy

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
Back to top
View user's profile Send private message
RMD



Joined: 29 Jan 2009
Posts: 13

PostPosted: Thu Jul 02, 2009 9:31 pm    Post subject: Reply with quote

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

Thanks.
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Thu Jul 02, 2009 9:36 pm    Post subject: Reply with quote

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

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

Stephen
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 594

PostPosted: Mon Sep 21, 2009 3:40 pm    Post subject: Reply with quote

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/2008/10/12/increase-addin-performance-with-maf-and-wpf-using-loaderoptimization.aspx
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group