I encountered a very strange problem. Once during the program’s operation, all threads were completely stuck, but the system was not affected. When I exited the program and re-entered it, it could not run at all, with no response whatsoever. This issue occurred in any of the 8 programs, but the system functions seemed unaffected. The host returned to normal after a power outage and restart. I tried to reproduce this bug, but I haven’t been able to do so temporarily. However, I suspect that it is related to the VexSystemStart command.
Must have been a bit flip.
We can’t help if you don’t share your code.
2 Likes
You have a problem with your code, so you should probably post the code.
2 Likes
int main() {
mytask9 = task(Video);
wait(10,sec);
vexSystemBoot();
// Prevent main from exiting with an infinite loop.
while (true) {
wait(100, msec);
}
}
The code in the video thread is like this:
uint8_t (pBuffer)[5];
while(1)
{
sprintf(FileName,“%04d.png”,Counter);
Brain.SDcard.loadfile(FileName, pBuffer, 16384);
wait(33,msec);
Brain.Screen.drawImageFromBuffer(pBuffer,20,20,16384);
Counter += 1;
Brain.Screen.setCursor(1,1);
Brain.Screen.print(Counter);
if(Counter >= 6500)
{
Counter = 0;
}
}
This code may not have any practical use, it was just a bug that I accidentally triggered while trying out the commands in the VEX API.This does not seem to be a stable triggered bug, and sometimes it can freeze the entire system.