ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: I'm using A: When there is a -51 or -39 error from within an application using GX, it is usually caused by double disposing a GX object (e.g., a shape, ink, style, or transform). The -51 error is generated because the shape is located in the disk-based
backing-store file. After the first dispose, the backing-store file is deleted
(as it should be), but after the second dispose, the shape's backing-store file
is gone, so the file manager returns a -51=
Make sure you're not disposing of the GX shape created in your If this doesn't solve the problem, install the "GXGraphics (debug) init" and turn on validation to make it easier to find the origin of the double-dispose. Start with the following validation setting:
If your application continues to run without any validation errors from GX, turn up validation by adding the following flag:
If everything continues to work, add the following flag to the mix:
As you increase the amount of validation, you'll see an increasing slowdown, but hopefully, validation will catch the problem. For additional details about GX validation, see the chapter on GX validation in GX Environment & Utilities. |
|