More details on NL auton issues

Hello, Here are some more details on this issue: https://vexforum.com/t/more-weird-stuff/45348/1

Using the code below I can reproduce the issue on two different robots. Once again the symptoms of the issue are that the natural language commands of forward() and backward() do not always work in autonomous. Other motor commands do work, including commands for the drivetrain.

In testing with this program the issue was not consistent. Sometimes one or two of the forward()/backward() commands were executed, sometimes all three, and sometimes the motors sounded like they were engaging, but the robot did not move. I used the competition switch simulator in RobotC to launch the auton. I started with the robot Disabled, did a Clear All, pressed Start, and then pressed Autonomous.
https://drive.google.com/open?id=1ME-NH8O7-x7XhuFSAruBFQNf_FEmzn5g Changing the following variables seemed to affect the likelihood that the forward/backward commands would be executed:

Not plugging in the partner controller
Not starting the “drive” task inside usercontrol()
Using setMotor() commands vs setMotorSpeed() inside the drive task
Setting bStopTasksBetweenModes = false; inside pre_auton()
Removing the openLoop setting from the motor configurations

However, none of these changes completely resolved the issue. After retesting the robot would again fail on the 2nd or 3rd try. Perhaps this is some type of timing issue and these changes have an impact on timing.

The one change that did consistently work (seven consecutive successes = consistent) was not starting the program when the competition switch simulator was set to “Disabled”. I stumbled upon this by accident. After testing something, leave the competition switch in Autonomous mode, then download the program so that auton starts automatically when you press Start. The forward() and reverse() commands always worked when running the test this way.

Of course, that’s not a solution, because in a real competition match the robots always start out disabled. For now, the only solution that we have is to not use the forward and backward commands.

#pragma config(Motor,  port2,           rightDriveMotors, tmotorVex393_MC29, reversed, driveRight)
#pragma config(Motor,  port9,           leftDriveMotors, tmotorVex393_MC29, driveLeft)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX2)
#pragma competitionControl(Competition)
#include "Vex_Competition_Includes.c"
#include "NatLang_CORTEX.c"

/*task drive()
{
while (true)
{
setMotorSpeed(leftDriveMotors,0);
setMotorSpeed(rightDriveMotors,0);
//setMotor(leftDriveMotors,0);
//setMotor(rightDriveMotors,0);
wait1Msec(20);
}
}
*/

void pre_auton()
{
	bStopTasksBetweenModes = true;
}

task autonomous()
{
	backward(0.5,seconds,70);
	wait1Msec(500);
	forward(1.3,seconds,60);
	wait1Msec(500);
	backward(1,seconds,127);
	wait1Msec(500);

	//return;
}

task usercontrol()
{
	//startTask(drive);
}