"INFINITE LOOP DETECTION WITHIN APPLICATION ER" Error Received when Running Custom Application
Purpose of Document
When running one custom interactive application, we are getting the following error in the e1root_xxx.log :
27 Oct 2010 08:19:34,313[SEVERE][1000183][RUNTIME]*** INFINITE LOOP DETECTION WITHIN APPLICATION ER:**** Form Name :P58S011_W58S011B_ZJDE0001 On Event: Row is Exit & Changed - Asynch, at ER Line = 39 While Statement: VA[25] == LI[String] = N && VA[24] == GC[23] On Control-ID: 1 ***********
What does this error mean?
The error is a result of an Infinite While loop experienced within the application program code.
To resolve the error, it is important to review the event rules of the problematic application, looking for issues where an infinite loop occurs.
The following is an example of this type of problematic event rule.
0037 F4101.Select GC Search Text = TK Search Text - Compressed 0038 F4101.Fetch Next VA frm_LITM <- TK 2nd Item Number VA frm_SearchText <- TK Search Text VA frm_SRP8 <- TK Category Code 8 0039 // 0040 While VA frm_ChkFlag is equal to "N" And VA frm_SearchText is equal to GC Search Text 0041 If VA frm_LITM is not equal to GC Search Text And VA frm_SRP8 is equal to "1,2,3" 0042 VA frm_ChkFlag = Y 0043 GC Short Item No = VA frm_ITM 0044 GC 2nd Item Number = VA frm_LITM 0045 // 0046 Else 0047 F4101.Fetch Next VA frm_LITM <- TK 2nd Item Number VA frm_SearchText <- TK Search Text VA frm_SRP8 <- TK Category Code 8 0048 End If 0049 End While
NOTE:
ER Line 39 is equivalent to event rule line number 0040 as index starts from 0 in serialized object
VA[25] is frm_ChkFlag and VA[24] is frm_SearchText
In the case where the condition did not meet line 0041, the above routine falls into INFINITE Looping
To correct this coding, line 0047 has to be written in between line number 0048 and 0049 (in front of End While to make correct cycle)
Unless it is crucial for your daily business, do not write WHILE loop for row events (e.g., Grid Record Is Fetched, Write Grid Line - Before or any Grid Events, Row is Exit & changed - Asynch, etc)
For this example, the if While Statement: VA[25] == LI[String] = N && VA[24] == GC[23] were executed more than 100,000 times, causing the error "INFINITE LOOP DETECTION WITHIN APPLICATION ER:" to appear.
This error message can reflect actual infinite looping (where java.exe will use up 100% CPU in local client) or same WHILE statement were executed over 100,000 times.
Your application may seem to be processing for a very long time and it hangs.
To fix this error, refine the event rule code you have written. If possible, do not put WHILE condition in row events (e.g., Grid Record Is Fetched, Write Grid Line - Before or any Grid Events, Row is Exit & changed - Asynch, etc).
NOTE: Oracle is not responsible for incorrectly implemented custom event rules. You can debug your custom application by capturing the jasdebug.log and then refine your application code so that it meets your requirement.