To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 5217
5216  |  5218
Subject: 
Stack Overflow
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 23 Jan 1999 19:31:12 GMT
Original-From: 
William Sitch <WSITCH@ENGSOC.CARLETON.saynotospamCA>
Viewed: 
1024 times
  
Hi everyone:

    I'm trying to download a rather large chunk of code to the HandyBoard,
and I'm having a problem when I exceed a certain number of instructions in a
procedure I'm running.  When I try to download the code, I get the error
"yacc stack overflow" pointing to a line in a procedure that I spawn to be
multitasked.

I tried to increase the stack size of the process I spawn, but the error
still exists.  I think I might be getting a compile-time stack overflow - or
something like that.  The procedure it crashes for is a leg controller, and
consists of many "if .. else if" statements.

It would be bad design to move some of the code to another procedure, and I
would like to avoid doing that.  Does anyone know exactly why I'm having
this problem, or what I could do to remedy the situation?

Thanks in advance.

--
William Sitch
4th Year Electrical Engineering   http://www.engsoc.carleton.ca/~wsitch



Message has 2 Replies:
  Re: Stack Overflow
 
(...) code: please send it to me privately and I'll see what I can do. PS: What kind of hardware/software platform are you on? "Yacc" is typically a Unix program that I thought had nothing to do with IC. (And yes, the real Unix "yacc" can stack (...) (26 years ago, 24-Jan-99, to lugnet.robotics.handyboard)
  Re: Stack Overflow
 
(...) If your code looks something like this... if (i == 1) do001(); else if (i == 2) do002(); else if (i == 3) do003(); else . . . if (i == 100) do100(); ...then try changing it to this: /* Not really a loop, just so we can break */ for (;;) { if (...) (26 years ago, 24-Jan-99, to lugnet.robotics.handyboard)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR