VEXcode Red Highlighting (make process closed with exit code: 1)

With the new update, i was having a problem with the red highlighting in the code. The red highlighting is for recognizing errors, and instead i’m getting a weird error. “[error]: make process closed with exit code : 1”. Let me know if there is a way i could get the highlighting back, because it is hard to debug my code and find the errors.

Capture
The picture above contains code that has several errors, but there isn’t red highlighting or the squiggly lines to show that something is wrong with the code.

Could you give us more than that expert? Preferably the whole code.

Why would you need the whole code? The picture just shows an example. I am pretty sure it is something with the compiler, and not with the code.

If my memory is correct “pressed” triggers a function, did you make intakeFwd and intakeRev functions?

1 Like

Yes. Here are the functions:

Capture1

Btw this isn’t just a problem with the selected code segment, it’s more of a general error with the compiler.

new update, does that mean 0.9 to 1.0 or 1.0 to 1.0.1 ?

can you cut and paste here the contents of the output tab, it sounds like the compiler will not run. Are you on a school computer with any restrictions in place ?

1 Like

“make process closed with exit code : 1” is not the entire error, it just means “something has gone wrong”. There will be some additional text above that line in the “Output” tab with more detail.

The best way to get help with code that won’t compile is to copy & paste your source code (remember to wrap it in [code]…[/code] tags for formatting!), as well as the complete error you’re getting, otherwise it’s much more difficult to figure out what’s wrong.

/*----------------------------------------------------------------------------*/
/*                                                                            */
/*    Module:       main.cpp                                                  */
/*    Author:       10 Fusion                                                 */
/*    Created:      Mon Jul 15 2019                                           */
/*    Description:  VRC Robot Code 2019-2020                                  */
/*                                                                            */
/*----------------------------------------------------------------------------*/
#include "vex.h"

// ---- START VEXCODE CONFIGURED DEVICES ----
// Robot Configuration:
// [Name]               [Type]        [Port(s)]
// lFront               motor         2               
// lBack                motor         3               
// rFront               motor         4               
// rBack                motor         5               
// leftLift             motor         6               
// rightLift            motor         7               
// rightIntake          motor         8               
// leftIntake           motor         9               
// ---- END VEXCODE CONFIGURED DEVICES ----

using namespace vex;
 
//Documentationj
//All unit lengths are in inches

//Global Variables
int threshold = 10; //Threshold for both joysticks
int x = Controller.Axis4.position(percentUnits::pct); //Left Joystick X-Axis 
int y = Controller.Axis3.position(percentUnits::pct); //Left Joystick Y-Axis
int ry = Controller.Axis2.position(percentUnits::pct); //Right Joystick Y-Axis
double mDegrees;
int suppAngle;
//Driver control functions
 
//Drive function
void arcadeDrive(int sensitivity) {
  if(abs(x) < threshold) x = 0;
  if(abs(y) < threshold) y = 0;

  int senseX = pow(x/100, sensitivity) * 100;
  int senseY = pow(y/100, sensitivity) * 100;

  lFront.spin(directionType::fwd, senseY + senseX, velocityUnits::pct);
  lBack.spin(directionType::fwd, senseY + senseX, velocityUnits::pct);
  rFront.spin(directionType::fwd, senseY - senseX, velocityUnits::pct);
  rBack.spin(directionType::fwd, senseY - senseX, velocityUnits::pct);
}

void intakeFwd(int intakeSpeed) {
  leftIntake.spin(directionType::fwd, intakeSpeed, velocityUnits::pct);
  rightIntake.spin(directionType::fwd, intakeSpeed, velocityUnits::pct);
}

void intakeRev(int intakeSpeed) {
  leftIntake.spin(directionType::rev, intakeSpeed, velocityUnits::pct);
  rightIntake.spin(directionType::rev, intakeSpeed, velocityUnits::pct);
}

//Lift function
void lift(/*int liftSpeed*/) {
//testing
   //int liftMax = LiftPot.value(percentUnits::pct);

  /*if(Controller.ButtonA.pressing()) {
      while(liftMax > 0 && liftMax < 75) {
        leftLift.spin(vex::directionType::fwd, liftSpeed, velocityUnits::pct);
        rightLift.spin(vex::directionType::fwd, liftSpeed, velocityUnits::pct);
      }
    }*/

 if(abs(ry) < threshold) xy = 0;

  leftLift.spin(directionType::fwd, ry, velocityUnits::pct);
  rightLift.spin(directionType::fwd, ry, velocityUnits::pct);
}
 
//Intake function
void intake(int intakeSpeed) {
    Controller.ButtonR1.pressed(intakeFwd(intakeSpeed));
    Controller.ButtonL1.pressed(intakeRev(intakeSpeed));
  /*if(Controller.ButtonA.pressed()} {

  }
  else if(Controller.ButtonB.pressed()) {

  }*/
}

//Autonomous movement functions

void moveForward(int distance) {
  mDegrees = (distance/(4*M_PI)) * 360;
  lFront.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
  lBack.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
  rFront.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
  rBack.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
}
 
void moveBackward(int distance) {
  mDegrees = (distance/(4*M_PI)) * 360;
  lFront.startRotateFor(directionType:rev, mDegrees, rotationUnits::deg, false);
  lBack.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
  rFront.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
  rBack.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
}
 
void turnRight(int degrees) {
  suppAngle = 180 - degrees;
  lFront.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
  lBack.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
  rFront.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
  rBack.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
}
 
void turnLeft(int degrees) {
  suppAngle = 180 - degrees;
  lFront.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
  lBack.startRotateFor(directionType::rev, mDegrees, rotationUnits::deg, false);
  rFront.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
  rBack.startRotateFor(directionType::fwd, mDegrees, rotationUnits::deg, false);
}
 
//Different Instances of Autonomous Periods

void blueLeft() {

}

void blueRight() {
 
}

void redLeft() {
 
}
 
void redRight() {
 
}

/*---------------------------------------------------------------------------*/
/*                          Pre-Autonomous Functions                         */
/*                                                                           */
/*  You may want to perform some actions before the competition starts.      */
/*  Do them in the following function.  You must return from this function   */
/*  or the autonomous and usercontrol tasks will not be started.  This       */
/*  function is only called once after the cortex has been powered on and    */ 
/*  not every time that the robot is disabled.                               */
/*---------------------------------------------------------------------------*/

void pre_auton( void ) {
  // All activities that occur before the competition starts
  // Example: clearing encoders, setting servo positions, ...
  
}

/*---------------------------------------------------------------------------*/
/*                                                                           */
/*                              Autonomous Task                              */
/*                                                                           */
/*  This task is used to control your robot during the autonomous phase of   */
/*  a VEX Competition.                                                       */
/*                                                                           */
/*  You must modify the code to add your own robot specific commands here.   */
/*---------------------------------------------------------------------------*/

void autonomous( void ) {
  // ..........................................................................
  // Insert autonomous user code here.
  // ..........................................................................



}

/*---------------------------------------------------------------------------*/
/*                                                                           */
/*                              User Control Task                            */
/*                                                                           */
/*  This task is used to control your robot during the user control phase of */
/*  a VEX Competition.                                                       */
/*                                                                           */
/*  You must modify the code to add your own robot specific commands here.   */
/*---------------------------------------------------------------------------*/

void usercontrol( void ) {
  // User control code here, inside the loop
  while (1) {
    // This is the main execution loop for the user control program.
    // Each time through the loop your program should update motor + servo 
    // values based on feedback from the joysticks.

    // ........................................................................
    // Insert user code here. This is where you use the joystick values to 
    // update your motors, etc.
    // .......................................................................
    while(true) {
      arcadeDrive(75);
      lift();
      intake(50);

    }

    task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources. 
  }
}

//
// Main will set up the competition functions and callbacks.
//
int main() {
    //Set up callbacks for autonomous and driver control periods.
    Competition.autonomous( autonomous );
    Competition.drivercontrol( usercontrol );
    
    //Run the pre-autonomous function. 
    pre_auton();
       
    //Prevent main from exiting with an infinite loop.                        
    while(1) {
      task::sleep(100);//Sleep the task for a short amount of time to prevent wasted resources.
    }    
       
}

Capture2

There’s the code and the error. Btw do you need the robot-config too?

ok, so there’s an issue with the toolchain.
Are you on PC ?
Did VEXcode ever work ?
probably best to reinstall.

1 Like

I’ve reinstalled like 3-4 times. Nothing changed. Also tried repairing the app, and still nothing happened. I am also using PC. Btw VEXcode worked before, but after the update it stopped working.

go to this location on your PC
C:\Program Files (x86)\VEX Robotics\VEXcode V5 Text

check there is a toolchain and sdk folder.

have a look here
C:\Program Files (x86)\VEX Robotics\VEXcode V5 Text\toolchain\vexv5\win32\tools\bin

is make.exe at that location.

do you have any anti-virus software running ?

1 Like

Yes make.exe is there.

image

What is the problem with a anti-virus software?

It may have blacklisted make and the compiler so they won’t run.

1 Like

I have deleted all of my anti-virus software(mcafee, norton, etc.) and have disabled windows defender, but i still get the same error in my program.

I actually fixed my own problem. It was because there was something wrong with the microsoft redistributable package that vexcode uses, so i just reset it.

2 Likes

ok, interesting, the redistributable is needed for the compiler and language server (clang and clangd), I’m surprised that caused the error with make, but glad you fixed it, that’s something we can add to our knowledge base.

1 Like