From: Gennady Date: 2004-01-15T17:18:17+09:00 Subject: Re: Stack level too deep (SystemStackError) On Jan 14, 2004, at 23:31, Jesper Olsen wrote: > Gennady wrote in message > news:<4005BB60.70009@tonesoft.com>... >> Jesper Olsen wrote: >>> I have a program where I'm getting a Stack level too deep >>> (SystemStackError) >>> exception >>> >>> I did not expect this, and I would prefer to fix it by increasing the >>> stack, rather than changing the program... >>> >>> Is this possible? >>> I think this exception is quite common, but was not able to google a >>> solution. >>> >>> Jesper >>> >>> -- >>> http://JesperOlsen.Net >>> >> What's your OS? BTW, it is a known issue with Mac OS X where in most >> cases you must increase the default stack size. > > How? In bash, "ulimit -s" shows the current stack size in kbytes (defaults to 8192 in Mac OS X, really low). To change it issue "ulimit -s ". The command may be different for other shells. You may put this command in /etc/profile to be set every time a user logs in. > >> >> Gennady. > > It happens both with > > - Ruby 1.6.8 on BSD Unix > - Ruby 1.8.0 on Win2000 The above command will work for BSD Unix too. I do not know how to do it for Win2000. Are you sure that there's no actual problem with your program? It may really be run-away in recursion, so increasing the stack size will only make the problem happen somewhat later. > > > Jesper > > Sincerely, Gennady Bystritsky