View unanswered posts | View active topics It is currently Mon Oct 20, 2014 9:08 am






Reply to topic  [ 3 posts ] 
Failed to release 'stack' allocated temporary variables 
Author Message
Rookie

Joined: Sat Nov 09, 2013 11:02 pm
Posts: 4
Post Failed to release 'stack' allocated temporary variables
1) If you are getting an error, please tell us what error you are getting and what the message says.

**FATAL**:Compiler error. Failed to release 'stack' allocated temporary variables 6(12) to 7. Pass 'Emit Code:135'

2) Give us the version of ROBOTC you're using

3.62

3) Give us the platform type (NXT, VEX CORTEX, etc.)

VEX CORTEX with RVW

4) Describe the issue as best as you can

I try to compile; I get a stream of error messages starting with this one.

5) Give us steps on how to reproduce the problem

Try to compile the attached file.

6) Provide a screenshot if it applies

7) Tell us the operating system you are using

Windows/NT Media Center Edition w/ SP3

8) Provide us with any other information that would help us fix the issue[/list]

I'm running on a fairly old laptop with 1.5 gig of ram. I'm an old hand at C, although rusty, but am new to RobotC; this is the start of my first program.


Attachments:
turner.c [5.5 KiB]
Downloaded 110 times
Mon Nov 11, 2013 11:49 pm
Profile
Rookie

Joined: Sat Nov 09, 2013 11:02 pm
Posts: 4
Post Re: Failed to release 'stack' allocated temporary variables
Update: I've gotten around the problem by changing two statements in the program:

int delta = 2*abs(127-abs(baseSpeed));

which occurred in two places in the program was replaced by

int absBaseSpeed = abs(baseSpeed);
int delta = 2*abs(127-absBaseSpeed);
.

I tried this on the theory that a stack problem like this could be caused by a complex expression; none of my expressions was all *that* complicated, but this one did have an abs() being called within an abs() parameter list. Those decades of programming paid off.

I'd still appreciate any insight that you might have, such as other situations where this is likely to occur, and info on whether this is fixed in 4.0.

Bruce


Mon Nov 11, 2013 11:58 pm
Profile
Rookie

Joined: Sat May 31, 2014 8:10 am
Posts: 1
Post Re: Failed to release 'stack' allocated temporary variables
:bigthumb: new to RobotC and C for that matter, but experienced in PHP
got this same error and your post resolved it for me.. Thanks!

Similar situation but floor rather than abs


Sat May 31, 2014 8:40 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.