I ran into a Java StackOverflow error, but the offending recursive call is so deep, that it does not give me the full stack trace. It only dumps out the first 1024 lines of methods of the StackOverflow exception.
How can I get the full stack trace, so that I can know the root cause?
Stack overflow means, that you have no room to store local variables and return adresses. If your jvm does some form of compiling, you have the stackoverflow in the jvm as well and that means, you can't handle it or catch it.
The Java stack size is the size limit of each Java thread in the Java Virtual Machine (JVM) that runs the monitoring Model Repository Service. The default value is 512K.
Increase Thread Stack Size (-Xss) Increasing the stack size can be useful, for example, when the program involves calling a large number of methods or using lots of local variables. This will set the thread's stack size to 4 mb which should prevent the JVM from throwing a java.
The switch -XX:MaxJavaStackTraceDepth
allows larger and smaller stack trace lengths. Set it to -1
for an unlimited length. E.g.:
-XX:MaxJavaStackTraceDepth=-1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With