FIX: GPF with Long Formulas in Crystal Reports Custom Control

ID: Q108658


The information in this article applies to:


SYMPTOMS

Loading the Formulas array property with long strings at run time can cause a general protection (GP) fault. The following problem applies to CRYSTAL.VBX, the Crystal Report custom control file.


CAUSE

This is a memory management problem in the CRYSTAL.VBX control that ships with Visual Basic version 3.0.


RESOLUTION

The newest version of CRYSTAL.VBX corrects this problem. You can download the latest CRYSTAL.VBX file by modem from the Crystal Services bulletin board system (BBS) at (604) 681-9516. In the Crystal Services BBS, download the VBVBX.ZIP file from the Files section.


STATUS

This bug is corrected by the latest version of CRYSTAL.VBX.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Start a new project in Visual Basic. Form1 is created by default.


  2. Choose Add File from the File menu. Add the CRYSTAL.VBX file from your WINDOWS\SYSTEM directory. CRYSTAL.VBX is the Crystal custom control file.


  3. Add a Crystal custom control to Form1.


  4. Double-click the form to open the code window. Add the following code to the Form Load event:
    
       Sub Form_Load ()
          For i = 0 to 10
            Report1.Formulas(i) = Space$(200)
          Next i
       End Sub
     


  5. Start the program, or press the F5 key. A GP fault may occur on some computers.


If you replace Space$(200) with Space$(110), the form loads but the GP fault may occur when you unload the form. If you change to Space$(100), the program may run without error. The exact behavior depends upon the current memory state of your Windows session.


REFERENCES

For a complete list of Crystal Reports support offerings, see the last three pages (PSS-1 to PSS-3) of the Microsoft Visual Basic Version 3.0, "Professional Features Book 2" in the Crystal Reports User's Manual section.

Additional query words: 3.00 GPF buglist3.00 fixlist3.00


Keywords          : PrgCtrlsCus 
Version           : 3.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: June 23, 1999