Consultor Eletrônico



Kbase P107057: AppServer crashes running a 4GL program. Stack trace contains scBuildSignature and rnpshoTTHDL.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x

SYMPTOM(s):

AppServer crashes running a 4GL program.

Error 49 in the AppServer server log file.

SYSTEM ERROR: Memory violation. (49)

4GL program uses an INPUT-OUTPUT TABLE-HANDLE parameter.

4GL program deletes the TABLE-HANDLE within an internal procedure.

Stack trace from _proapsv reads:

scBuildSignature
rn_check_local_buf
rnpshoTTHDL
rnpsho.

CAUSE:

This is a known issue.
The problem is that the TABLE-HANDLE handle passed in as an INPUT-OUTPUT parameter is being deleted from within an internal procedure.
When that happens, Progress should postpone the deletion of the temp-table associated to the table-handle parameter until the end of the main procedure, but it fails to do so; as a consequence, the temp-table that should be returned to the client disappears, and the AppServer crashes when trying to marshal the evaporated temp-table back to the client.

FIX:

As a workaround, only delete the TEMP-TABLE associated to the INPUT-OUTPUT parameter from within the main block.

In case your program running on the AppServer needs to delete the TEMP-TABLE that was passed in, and to replace it with a brand new TEMP-TABLE to pass back to the client, then:
- Define a new HANDLE variable.
- Create and handle the new TEMP-TABLE using that variable. Doing so from within an internal procedure presents no hurdles.
- Upon returning to the main block, delete the TEMP-TABLE associated to the INPUT-OUTPUT TABLE-HANDLE parameter.
- Assign the value of the new HANDLE variable to the INPUT-OUTPUT TABLE-HANDLE parameter.

For example:

DEFINE INPUT-OUTPUT PARAMETER TABLE-HANDLE phIoTT.

/* Define a new variable. */
DEFINE VARIABLE hNewTT AS HANDLE NO-UNDO.

/* Create the new TEMP-TABLE, even in
an internal procedure. */
RUN internalProcedure.

/* Only now [in the main block] do delete
the TEMP-TABLE that came from the client. */
DELETE OBJECT phIoTT.

/* Assign the new TEMP-TABLE. */
ASSIGN phIoTT = hNewTT.


PROCEDURE internalProcedure:

/* Create the new TEMP-TABLE. */
CREATE TEMP-TABLE hNewTT.

/* Both TEMP-TABLEs are now available. */

END PROCEDURE.