Discussion:
[jruby-user] Stack memory overflow
Na Na
2013-02-16 06:57:49 UTC
Permalink
Hi,

I occasionally get the following output when I run my code (test.sh is
just a quick way of me running the java command with all the options I
want):

# ./test.sh
Error: Your application used more stack memory than the safety cap of
2048K.
Specify -J-Xss####k to increase it (#### = cap size in KB).
Specify -w for full StackOverflowError stack trace
#

In every case so far where I've tried to track down the cause in recent
code, it's turned out that I've specified a name wrong. Perhaps I
mention a variable or such that doesn't exist. Some typo like that.

In MRI ruby I'm used to ruby telling me the exact line where it has a
problem. In JRuby I seem to sometimes get the above cryptic message
with no clue as to where the culprit is. As you can imagine, if I've
made large changes recently it's tedious to go through trying to figure
out which line is giving the trouble.

Is there a way for me to get JRuby to actually tell me the line it's
having trouble with?

Thanks
--
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Na Na
2013-02-16 07:03:01 UTC
Permalink
I've tried adding -w, but the output seems to be jruby/java code
unrelated to my own code.
--
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Na Na
2013-02-16 08:51:39 UTC
Permalink
Further information: I suspect this occurs when I call a non-existent
method, and not when I get a variable name wrong. It would be much more
useful if it would just fail upon missing method and tell me where it
failed than just giving a generic stackoverflowerror.
--
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Bruce Adams
2013-02-16 14:33:38 UTC
Permalink
Can you show us code for a failing case? I'm having trouble guessing what might be happening. (I've never seen a stack overflow under JRuby that didn't make sense.)
Post by Na Na
Further information: I suspect this occurs when I call a non-existent
method, and not when I get a variable name wrong. It would be much more
useful if it would just fail upon missing method and tell me where it
failed than just giving a generic stackoverflowerror.
--
Posted via http://www.ruby-forum.com/.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_e
Loading...