Did this article resolve your question/issue?



Client calling Crystal ActiveX crashes after some time


TitleClient calling Crystal ActiveX crashes after some time
URL NameClient-crashes-after-some-time-calling-Crystal-ActiveX
Article Number000181120
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: Windows
Other: Crystal Reports 10, RDC, ActiveX
Question/Problem Description
Client calling Crystal legacy ActiveX controls sees its memory consumption grows, then crashes after some time.

PROWIN32 memory consumption grows to 800MB (from 50MB at startup).

Crystal Report (.rpt) is approx. 60MB (pdf size is much lower).

A couple of different ActiveX errors are generated, originating from different procedures in the code.

When monitoring PROWIN32 using Process Explorer, the process can be seen to create new .tmp files (for example, ~cxd{6C6C9350-6311-43F2-ADD5-C42B6C56E6F4}.tmp and ~DFF3FF.tmp) in the current user's Temp folder.

Temp files are created each and every time that the code is executed, but never removed.

After executing the code in a loop (5000 iterations), the Crystal RDC engine eventually reports a "Memory Full" error message.
Steps to Reproduce
Clarifying Information
Application exports reports to PDF files, or generates and emails reports.

Using the legacy Crystal Reports RDC components to generate reports.
Error MessageError occurred while accessing component property/method: EXPORT.
The file is in use by another application.
Error code: 0x80020009 <procedure> <filename> (5890)

SYSTEM ERROR: Unable to allocate memory from the storage pool. (4100)
Unable to set attribute PRINTER-NAME in widget <widget name> of type PSEUDO-WIDGET. (3131)
Defect/Enhancement Number
Memory leak caused by assigning a Crystal object to a handle variable and not deleting / releasing it at the end of the procedure. For example,
vHndCxn = gHndDoc:Database:Tables(1):ConnectionProperties.
Ensure that all assigned COM-HANDLEs are released by the end of the procedure to prevent the memory leak.
ASSIGN vHndCxn = ?.

The temporary files that the Crystal ActiveX generated in the current user's Temp folder are still created but are now deleted / removed when the code completes.
References to other documentation:

Progress article(s):
"Managing Memory within the ABL?"
Last Modified Date11/20/2020 7:16 AM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.