This is a migrated thread and some comments may be shown as answers.

Error generating multiple PDF reports programatically

2 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
chaiwalla
Top achievements
Rank 1
chaiwalla asked on 07 Apr 2010, 12:48 AM
We have a Windows Service that runs batch jobs using multiple threads. When trying to generate PDFs concurrently in multiple threads, we get the below exception. Any workaround for this?

Version:1.0StartHTML:0000000105EndHTML:0000001031StartFragment:0000000127EndFragment:0000001011System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Drawing.SafeNativeMethods.PrintDlg(PRINTDLGX86 lppd) at System.Drawing.Printing.PrinterSettings.GetOutputPort() at System.Drawing.Printing.PrinterSettings.FastDeviceCapabilities(Int16 capability, IntPtr pointerToBuffer, Int32 defaultValue, String printerName) at System.Drawing.Printing.PrinterSettings.Get_PaperSizes() at System.Drawing.Printing.PageSettings.PaperSizeFromMode(DEVMODE mode) at System.Drawing.Printing.PageSettings.GetPaperSize(IntPtr modeHandle) at System.Drawing.Printing.PageSettings.get_PaperSize() at Telerik.Reporting.Drawing.PageSettings.GetDefaultPaperKind() at Telerik.Reporting.Drawing.PageSettings..ctor() at Telerik.Reporting.Report.get_PageSettings() at Centroid.Reports.LoadCoverPage.InitializeComponent() 
[snip]

2 Answers, 1 is accepted

Sort by
0
chaiwalla
Top achievements
Rank 1
answered on 07 Apr 2010, 03:45 AM
My apologies for posting this multiple times. Whenever I submitted the form, I got a server error from the website, so I assumed the message was not posted. Please delete my other posts.
0
Steve
Telerik team
answered on 08 Apr 2010, 04:22 PM
Hi chaiwalla,

We've tried to reproduce this on our end but with no success. We have created a small test application that executes 20 different threads to render the same report 20 times simultaneously. However we cannot reproduce the error - the application always completes successfully in our test runs.

You can try to run our test application on your machine to confirm if there is something specific that causes the problem - such as unresponsive printer due to driver issues or slow network. The application requires the AdventureWorks sample database which comes with every installation of our product. If the problem cannot be observed with this application, it would be best to send us a small runnable project to reproduce that behavior on our end.

Greetings,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
chaiwalla
Top achievements
Rank 1
Answers by
chaiwalla
Top achievements
Rank 1
Steve
Telerik team
Share this question
or