Simulating and Troubleshooting StackOverflowError in Scala

In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to simulate StackOverflowError. StackOverflowError is a runtime error, which is thrown when a thread’s stack size exceeds its allocated memory limit. 

Sample Program

Here is a sample Scala program, which generates the StackOverflowError:

CategoriesUncategorized