Kbase P20595: 4GL: Error 4025 running multiple copies of persistent procedures
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/14/2009 |
|
Status: Verified
SYMPTOM(s):
4GL: Error 4025 running multiple copies of persistent procedures
**Unable to realize <widget name>. (4025)
Error occurs after the application has been running for a while.
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
CAUSE:
Running the following debugging code from a trigger while the offending application is running, revealed that some PERSISTENT procedures have multiple running copies. This eventually caused the application to either run out of available memory or reach the maximum number of widgets that can be created in a Progress 4GL/ABL session. Hence error 4025.
DEFINE VARIABLE hProcedureHandle AS HANDLE NO-UNDO.
DEFINE VARIABLE cProcedureName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cProcedureList AS CHARACTER NO-UNDO.
ASSIGN
hProcedureHandle = SESSION:FIRST-PROCEDURE
cProcedureList = hProcedureHandle:FILE-NAME NO-ERROR.
DO WHILE VALID-HANDLE( hProcedureHandle)ON ERROR UNDO, LEAVE:
hProcedureHandle = hProcedureHandle:NEXT-SIBLING NO-ERROR.
cProcedureList = cProcedureList + "~n" + hProcedureHandle:FILE-NAME NO-ERROR.
END.
MESSAGE
cProcedureList
VIEW-AS ALERT-BOX INFO BUTTONS OK.
FIX:
1. Never run any PERSISTENT procedure without first checking whether it is already running. For example:
IF NOT VALID-HANDLE(hDialog) THEN
RUN Dialog.w PERSISTENT SET hDialog NO-ERROR.
2. Delete all PERSISTENT procedures immediately after they are no longer needed. For example:
DELETE PROCEDURE h.
ASSIGN h = ?.
where h is the procedure handle.
3. Delete all widgets or WIDGET-POOLS created by a PERSISTENT procedures when that procedure longer is deleted.