Skip to Content
author's profile photo Former Member
Former Member

Intermittent APPCRASH when opening a form with CrystalReportViewer

We have an application that, as part of the functionality, allows users to generate and preview a report. It uses CR for VS 2010. The report preview dialog is a Windows Form that includes a CrystalReportViewer.

This functionality works, most of the time, but we are observing intermittent APPCRASH/Stackhash crashes when this form is opened of this nature:

------------------
Problem signature:
  Problem Event Name:  APPCRASH
  Application Name:      ****
  Application Version:    ****
  Application Timestamp:           4dd40fa4
  Fault Module Name:    StackHash_7698
  Fault Module Version:  6.1.7600.16385
  Fault Module Timestamp:         4a5be02b
  Exception Code:         c0000374
  Exception Offset:        00000000000c6cd2
  OS Version:    6.1.7600.2.0.0.256.48
  Locale ID:       1033
  Additional Information 1:          7698
  Additional Information 2:          7698c42b9ee8da1ebad3b3c9521cacfd
  Additional Information 3:          ad41
  Additional Information 4:          ad418ba72161d4cd11d7688fd368f113

This crash occurs intermittently. We have an automated script that tests the GUI and it may run for 5 minutes or several hours before encountering this error, with a handful, to tens, perhaps over a hundred report generated successfully.

As we understand it, the error code c0000374 means:

// MessageId: STATUS_HEAP_CORRUPTION

//

// MessageText:

//

// A heap has been corrupted.

CR is not the only part of our application that uses unmanaged memory, but this crash consistently happens when opening the dialog with a CR component in it (which renders a report).

I realize I've left out a lot of potential information, but will add more upon request. This problem is causing us quite some headaches and I just wanted to see if anyone else has experienced something similar.

Any ideas?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 08, 2011 at 04:00 PM

    1) I'd be interested in a bit more detail on the 'crash". What actually happens? Does the app hang? Does the app unload? IS there an error thrown on the screen? E.g.; what would I see experience if I was sitting in front of that computer? Make sure you are using SP 1 for CRVS2010:

    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads [original link is broken]

    MSM

    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_mergemodules_13_0_1.zip

    MSI 32 bit

    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_1.zip

    MSI 64 bit

    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0_1.zip

    2) Are you able to reproduce the issue on your development computer (without using a script - see (7) bellow)?

    3) Is this a 32 bit or a 64 bit app?

    4) Make sure the app is not compiled as "Any CPU"

    5) What is the OS?

    6) What is the database (or are you using datasets) and how are you connecting to it (ODBC, OLE DB, etc.)?

    7) Re.: "We have an automated script that tests the GUI and it may run for 5 minutes or several hours before encountering this error, with a handful, to tens, perhaps over a hundred report generated successfully."

    Can you generate the issue without the automated script? Is the "crash" behavior different if you do not use the script?

    8) Post code used. There is a limit of about a 1000 characters in these posts before you loose formatting, so if need be, split the code over two or more (hope not) posts...

    Ludek

    Follow us on Twitter http://twitter.com/SAPCRNetSup

    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Well, I think we found the problem, and I'm posting it for others who may run into this hard-to-debug failure.

      As I had said in the initial post

      "CR is not the only part of our application that uses unmanaged memory, but this crash consistently happens when opening the dialog with a CR component in it (which renders a report)."

      This is why the investigation started with CR, even though we were fully aware that any of the other unmanaged components could be corrupting the heap. After checking about every possible angle on our CR deployment with Ludek's help, it seemed to be sound and I decided to start looking at the other components. We also use (or should I say "used"? 😊 ) some compiled Matlab in our application to do some heavy calculations. I found that when disabling this functionality, the crash would not occur - we found our culprit.

      Needless to say, we are replacing that component.

      Ludek, thank you for your help. I hope you can understand why we initially suspected CR, with the little information we had to go on. In the end, neither windows updates nor replacing CR would have solved the problem - the latter would have only masked it. For anyone that runs into this error, it will be wise to discuss with them any and all other components that use unmanaged memory.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.