on 03-28-2018 4:09 PM
I have a c# web and windows application, which uses crystal report for generating report.
We have a situation such that the applications crashes while we trying to export to disk with a dialogue box vshost32.exe stopped working, even though we have implemented exception handling we are not able to get or catch the exception.
I found that the crystal report is causing the error by looking at the system log.
Is there any way that we can catch all the crystal report errors or excepetion from c# code?
If it's a random crash I suggest running DebugDiag and capture the crash dump. It may give you an idea of where the issue is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it's a random crash I suggest running DebugDiag and capture the crash dump. It may give you an idea of where the issue is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CR for VS supports all version of VS 2010 -> 2017 except Express Versions.
SAP Crystal Reports, Developer Version for Microsoft Visual Studio – Supported Platforms
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No info on the work flow or what is happening when the error happens so not much to suggest other than you need to do more debugging. Add logging to your app.
Windows can't defrag memory and CR needs contiguous blocks of memory so try cycling IIS every 12 hours and see if that helps.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are using SP 12 -
version: 13.0.12.1494,
Time to upgrade to SP 20 to stay on 2.0 Framework or SP 21 and above to support 3.5 Framework and above.
You can get the installers from here:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
READ all of the info to upgrade to SP 21 or above.
Check the Platform link also, you may be trying to install onto an unsupported OS.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use DebugDiag and see if it capture what CR component, or not, is generating the exception.
Also, try running VS and your app under the Admin account by right clicking on the EXE's and selecting run as Administrator.
It may be access permission issue.
ProcessMonitor may show you what dll is generating the error.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
don.williams Thank you for your response. We have installed applications which you have told and we are checking on this.
We have checked the event viewer, and found the following error in the log. Will it be helpful for you to analyze the actual issue?
Faulting application name: ReportApp.exe, version: 1.0.1705.1, time stamp: 0x5a8d2727
Faulting module name: crpe32.dll, version: 13.0.12.1494, time stamp: 0x5443a343
Exception code: 0xc0000005
Fault offset: 0x0032ca2a
Faulting process id: 0xd4fc
Faulting application start time: 0x01d3ba39e4c4e89a
Faulting application path: C:\Program Files (x86)\ReportApp\ReportApp.exe
Faulting module path: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crpe32.dll
Report Id: 291c8194-262d-11e8-80e5-0cc47a9b8aeb
Faulting package full name:
Faulting package-relative application ID:
Application: ReportApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 37B5CA2A
Hello don.williams, i have already implemented this but the application crashes without throwing an exception also i tried various other ways to handle this, I need to know if we can avoid application from crashing.
Since i got to know crystal report is causing the error i was thinking if there is any way we can handle this issue in the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wrap all functions in a try/catch block and in the catch add something like this:
catch (Exception ex)
{
if (ex.Message.ToString() == "Load report failed.")
{
MessageBox.Show("ERROR: Load report failed: " + ex.InnerException.Message.ToString());
Also, in the Viewer there are all sorts of event handlers you can add code to.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.