ROBOTC.net forums
http://robotc.net/forums/

RobotC Exception Violation
http://robotc.net/forums/viewtopic.php?f=11&t=3186
Page 1 of 1

Author:  JoeyV [ Thu Apr 07, 2011 3:01 am ]
Post subject:  RobotC Exception Violation

While we were testing our robot's autonomous, and it suddenly stopped responding. In the debugger perspective, a window popped up, titled "RobotC Exception Violation." The contents of the window included:
Byte Code Interpreter Exception
...
TaskState: 'Exception'
Exception Type: 'Real Address Range Exception (59)'

The details I left out refer to line 9 of this function:
Code:
int limitMotorPower (int number, int limit)
{
     if (number > limit)
     {
          return limit;
     }
     else if (number < -limit)
     {
-->                   return -limit;
     }
     else
     {
         return number;
     }
}


Any sort of assistance would be greatly appreciated.

Author:  mightor [ Thu Apr 07, 2011 4:00 am ]
Post subject:  Re: RobotC Exception Violation

Code:
int limitMotorPower (int number, int limit)
{
     if (number > limit)
     {
          return limit;
     }
     else if (number < -limit)
     {
           return limit * -1;   // <-- try this instead :)
     }
     else
     {
         return number;
     }
}

Author:  vamfun [ Fri Jan 13, 2012 2:02 am ]
Post subject:  Re: RobotC Exception Violation

I had a similar problem and your fix took care of it. Thanks. Do you have an explanation for the problem? Is there a bug fix in the works?

Author:  mightor [ Fri Jan 13, 2012 3:25 am ]
Post subject:  Re: RobotC Exception Violation

I have no explanation for the problem, perhaps if you mailed support@robotc.net you can get one.

- Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/