StackOverFlow error returned for IF controller when Loop count is set to forever
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**Rohit Pal** ([Bug 62760](https://bz.apache.org/bugzilla//show_bug.cgi?id=62760&redirect=false)):
Under Thread Group, give any number of threads, rampup and scheduler duration as you need but set Loop count to forever.
Add If controller under same thread group and add one HTTP Sampler.
Under If controller, uncheck Interpret Condition as Variable Expression? and set condition is such a way that it should return false. For e.g "PASS"=="PASSED" (This will return false)
Now if you run the script, In console, you can find UncaughtException --
2018-09-26 11:25:06,132 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.StackOverflowError: null
at org.apache.jmeter.threads.JMeterContextService.getContext(JMeterContextService.java:60) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.engine.util.SimpleVariable.getVariables(SimpleVariable.java:65) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.engine.util.SimpleVariable.toString(SimpleVariable.java:51) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:142) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:111) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:101) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:281) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.IfController.getCondition(IfController.java:177) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.IfController.next(IfController.java:237) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.GenericController.next(GenericController.java:175) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.LoopController.next(LoopController.java:134) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.LoopController.nextIsNull(LoopController.java:166) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.GenericController.next(GenericController.java:170) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.LoopController.next(LoopController.java:134) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:225) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.control.GenericController.next(GenericController.java:175) ~[ApacheJMeter_core.jar:5.0 r18
Created attachment [SlackOverFlow_IfController_LoopForever.jmx](https://apache.github.io/jmeter-bugzilla-attachments/60/62760/36162/SlackOverFlow_IfController_LoopForever.jmx): Jmx file - Please refer attached jmx file wherein Loop count is set to Forever, under If controller - condition is set to false and Interpret condition as variable expression is uncheck
SlackOverFlow_IfController_LoopForever.jmx
````xml
false
true
false
varPhase
PASS
=
continue
false
-1
1
1
true
5
"PASS"=="PASSED"
false
www.google.com/
https
GET
true
false
true
false
false
saveConfig
true
true
true
true
true
true
true
true
false
true
true
false
false
false
true
false
false
false
true
0
true
true
true
true
true
true
````
Severity: minor
OS: All
Duplicates:
* https://github.com/apache/jmeter/issues/4490
Contributor guide
Assessment
This issue has not been assessed yet.