Kbase P130307: OpenEdge crash with structured error handling and temp tables parameters
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/04/2008 |
|
Status: Unverified
FACT(s) (Environment):
Windows
OpenEdge 10.1C
SYMPTOM(s):
OpenEdge crash with structured error handling
ROUTINE-LEVEL structured error handling with temp tables defined as parameters can crash the session.
An error has occurred and this is being passed back to a calling program with a CATCH block.
The session crashes.
A temp table is being used as a parameter between procedures.
The stack trace looks like:
=====================================================
PROGRESS stack trace as of Mon Apr 14 13:37:15 2008
=====================================================
Startup parameters:
-pf D:\Progress\101C\startup.pf,-cpinternal 1252,-cpstream 1252,-cpcoll Basic,-cpcase Basic,-d dmy,-numsep 44,-numdec 46,(end .pf),-p _ab.r,-db e:\progress\101c\db\sports2000,-1,-debugalert
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 00682F26 01:00261F26 D:\Progress\101C\bin\prow32.dll
Registers:
EAX:02A1755C
EBX:00000002
ECX:BA654540
EDX:02A3BED8
ESI:02AD6058
EDI:00000000
CS:EIP:001B:00682F26
SS:ESP:0023:0012FA10 EBP:01446A84
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010202
Call Stack:
Address Frame
00682F26 00000000 pam_get_item+6C4A6
FIX:
This is a known issue.
As a work around do not use the temp table directly as an output parameter. Use a second temp table as the parameter, after copying the other temp table to it. For example:
ROUTINE-LEVEL ON ERROR UNDO, THROW.
DEFINE TEMP-TABLE t-error NO-UNDO FIELD errorMessage AS CHARACTER.
/* old parameter definition that causes the error */
/* DEFINE OUTPUT PARAMETER TABLE FOR t-error. */
/* secondary TT used to pass data back to calling program */
DEFINE TEMP-TABLE dummy NO-UNDO LIKE t-error.
DEFINE OUTPUT PARAMETER TABLE FOR dummy.
DEFINE VARIABLE lError AS LOGICAL NO-UNDO.
RUN prog2.p. /* program that raise the system error */
CATCH errorObject AS Progress.Lang.SysError:
DEFINE VARIABLE iMessage# AS INT NO-UNDO.
ASSIGN lError = TRUE.
DO iMessage# = 1 TO errorObject:numMessages:
CREATE t-error.
ASSIGN t-error.errorMessage = errorObject:getMessage(iMessage#).
END.
/* Fix code to copy data to secondary TT */
FOR EACH t-error:
CREATE dummy.
RAW-TRANSFER t-error TO dummy.
END.
DELETE OBJECT errorObject.
END CATCH.