Search code examples
openedgeprogress-4gl

Progress Warning: -s stack exceeded during procedure. What does that mean?


I have encountered a warning that I have never seen before.

Here is the message that I get when running my simple procedure:enter image description here

My procedure works as following:

  1. Read ReferenceNumbers out of a file
  2. Use those ReferenceNumbers in a for each
  3. Change value of Info field

Here is how it looks like in code:

INPUT FROM VALUE('C:\Users\admin\Desktop\ref\reference.csv').

DEFINE VARIABLE cData AS CHARACTER NO-UNDO.

repeat:
    if keyfunction(lastkey) = "end-error" then leave.
    process events.

    import unformatted cData.

    FOR EACH V_Acct
        WHERE V_Acct.Company = '123'
            AND V_Acct.ReceiptType = 'U'
            AND V_Acct.ReferenceNr = integer(TRIM(ENTRY(1,cData,';')))
            AND V_Acct.xInfo = ''
        EXCLUSIVE-LOCK:
        
        V_Acct.xInfo = 'VGF00000000000000'.

    END. /* for each V_Acct */                                     

END. /* repeat */

ReferenceNumbers are read properly out of the file (confirmed it multiple times). I have also changed certain fileds of that same DB Table in the past, and never encountered this error message.

Can anoyne assist me?


Solution

  • A common cause is trying to use long character variables. IOW you maybe trying to IMPORT a very long line.

    https://knowledgebase.progress.com/articles/Article/P79111

    -s is not specific to one single variable (the limit for a character variable is 30,000 bytes) but rather is across many various usages of stack space. So it may just be that you were close to the limit for other reasons and this pushed you over the edge.

    The default value of -s changes over time depending on the OpenEdge version that you are using and it is also possible that your application, or your particular session, has set a non-default value either higher or lower. If a protrace file was generated it will tell you what -s value was in effect at the time of the problem.

    Look for a file named protrace.### (where ### is your process id) with a timestamp the same as the error. This may be in either the current working directory or in the WRKDIR for the application.