401
Views
6
Comments
how to stop infinite loop

Hello,

I have accidentally created an infinite loop using if else condition, and now it is endless creating new data points. It has been on going for hours and has reached up to over a million data point. 


Please advice on how to deal with this issue. Thank you

2026-02-26 06-29-24
Rahul
 
MVP

Hi @Low Nico ,

Only single statement is not enough to provide solution.

what logic you implemented, in if else statement what you provide like if N=100 and true false something and N start with 1 so it will take 100 times reputation. 

Please add some screen shot or oml for best solution.


regards

Rahul

UserImage.jpg
Low Nico

This is the endless loop, testpointimagecount is a local variable with default value of 0.

is the if condition


is the assign.


So the loop is endless as it is always false. I have only executed this once but it is still constantly and endlessly running. 

2026-02-26 06-29-24
Rahul
 
MVP

Hi ,

have you debugged this code.

here you define like GetWOPartsByWOID.List.current.count how many counts return by this aggregates.

check probably here is the issue.


UserImage.jpg
Low Nico

Hello,

My issue is on how to actually stop the infinite loop, will fixing the GetWOPartsByWOID.List.current.count stop the infinite loop? 

2021-09-06 15-09-53
Dorine Boudry
 
MVP

maybe try by fixing the code and republishing it.

if that does not work, maybe open a support ticket

2019-02-27 17-48-20
Caldeira81

Hi, yes fixing you code, maybe do a for each also to do a loop and need to publish with a new fix code to stop the infinit loop.

some ideias

https://www.outsystems.com/forums/discussion/78053/how-can-i-break-my-foreach-loop/ 

https://www.outsystems.com/forums/discussion/62055/terminate-running-server-actions/

where some tips from @Daniel Kuhlmann :

"You could try and publish a new version of your module that will fix the endless loop. 

If that does not help consider disable and then enable the application again in Service Center.

If that does not help consider restarting the services in LifeTime."

Regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.