FIX: GPF with Long Formulas in Crystal Reports Custom Control

Last reviewed: October 30, 1997
Article ID: Q108658
3.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

  • Professional Edition of Microsoft Visual Basic for Windows, version 3.0

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 reference words: 3.00 GPF buglist3.00 fixlist3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus
Keywords : PrgCtrlsCus kbbuglist kbprg
Version : 3.00
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.