Memory Permission Error

gyro myGyro = vex::gyro(Brain.ThreeWirePort.A);

This line of code (above) seems to yield a memory permission error. VEXcode V5 Text version 1.0.1 is being used, and the robot brain’s software version is 1.0.8. Any suggestions on how to fix this? (Error code: 03800EA4)

If that is being used in a file other than robot-config.cpp, there’s a good chance that there is no Brain.ThreeWirePort.A instance as the order that constructors are called is not guaranteed across files.

either move to the same file as where Brain is constructed or do something like this.

triport ThreeWirePort = vex::triport( vex::PORT22 );
gyro myGyro = vex::gyro(ThreeWirePort.A);

I also am having problems with a memory permission error, but it is with Vexcode 1.0 and I just switched from RobotC. My problem is error 03011A8, but I have no idea what it is or means.
Could you please explain?

The number is pretty much meaning less to anyone outside of the V5 dev team, it’s the address in your code that caused the error.

These errors are usually created by a mistake in your code, perhaps trying to access the elements beyond the end of an array or using an uninitialized pointer.

If you can’t figure it out then export and attach the project and I will take a look.


Thanks, I think I figured it out. It was a pretty stupid mistake on my part. I put my variables outside of the main task. Someone shoot me.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.