Stack over flow error when using Cucumber

Hi

I have recently hit an error that reads:

...com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.StackOverflowError
	at cucumber.runtime.io.FileResourceIterator$FileIterator.next(FileResourceIterator.java:73)...

I appear to only get this issue when running test suites from the command line (i can run them without issue in the IDE), which is problematic as i cant use Jenkins to kick off test suites.

Its a problem that has recently occurred (last 3 days), but also to boot, i have seen java messages pop up in the IDE that break all links to step definitions (has been an issue for around 4 weeks), so i have restart the IDE to fix, only to get the same issue pop up later in the day.

Im not too sure where or how to solve this issue, has anyone else had this issue? Could it be an IDE bug? Cucumber bug?

Thanks.

1 Like

Im still getting this issue but its only present on Mac (Windows 10 dosnt seem to suffer the issue).

I have noticed a pattern, the first test case fails, but the 2nd (3rd, 4th etc) run without issue.

I cant actually pass a test suite as the first one always fails.

I dont know whether this is Mac specific, but id like to setup an Ubuntu AWS instance and have tests run on that, but im not confident ill be able to run test suites from Jenkins.

Is anyone able to look into this? It feels like a fundamental Katalon issue, as i have tried various test suites with varying complexity and the issue is still persistent.

Happy to provide more detail if needed.

Thanks.

1 Like

Yeah I get the smiliar issue

com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.StackOverflowError
at cucumber.runtime.io.FileResourceIterator$FileIterator.next(FileResourceIterator.java:73)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:29)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:27)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:27)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:32)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:32)

This issue is intermittent but quite annoying because always happens on some test cases in my test suites.

I hope someone have the solution

1 Like

Thanks @Dimas_Tekad_Santosa its good to know im not the only one with this issue. Are you using a Mac by any chance? I dont recall seeing this issue on Ubuntu, and dont currently see it when running tests on Windows.

I have bumped the start and maximum memory allocation in the katalon.ini on Mac (where im seeing the issues), and think 4GB should be fine, see my katalon.ini below:

-startup

../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar

--launcher.library

../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.401.v20161122-1740

-data

@noDefault

-vm

../../Contents/Eclipse/jre/Contents/Home/jre/lib/jli/libjli.dylib

-vmargs

-Xms4096m

-Xmx4096m

-XstartOnFirstThread

-Dorg.eclipse.swt.internal.carbon.smallFonts

For reference, this post helped - Katalon Studio, memory issue adding variables for data driven testing

yeah … 256 for xms is … hilarious in this epoch.
i have suggested already to katalon devs to reconsider the default values, hope with next releases they will change it.
cc @ThanhTo

Hi,

I develop on mac OS, but I run the test cases from windows env…

@Ibus yeah i would say 256 also is really rather limited, a larger default would be better

@Dimas_Tekad_Santosa that is interesting, could this indeed be a MacOS bug?

i will not say it is strictly a bug, but rather a particular behavior of jvm