User Program has exceded time limit of 3 seconds

So, i have a c++ iq programming, but when i try to use it, after about 1 second the brain stop working and shows on screen “User Program has exceded time limit of 3 seconds” and ask to reboot, heres my code btw

Is this a blocks project ? or a project that started as a blocks project and now you are using C++ ?
When did it stop working ? I see a revision history, that may give a clue.

Anyway, send me the project (zip up the vexcode file and post here) and I will take a look, it’s a big project and may just be too much for the IQ generation 1.


The project was an block project, but since about 3 months i made on c++, the changelog (the changelog is on spanish btw).
Heres a drive link to the programming on zip

removing the while loop in the check button handler seems to solve the issue.

What you are really suffering from is that block code makes really bad C++ code, that is, the programming patterns used in blocks (mostly all the event/broadcast stuff, variables forced to be floats) is really not the way it would be written in C if starting with a new program. In general, event handlers should not contain blocking loops. IQ can only allow a small number of tasks and event handlers to run at any one time, a blocking event handler is using up valuable resources. However, for now try this change (remove or comment out the while(true) loop) and see if everything else is working.

code fix
void onevent_buttonCheck_pressed_0() {
//  while (true){
  if (MenuEnd == Off_) {
    if (selector == 1.0) {
    if (selector == 2.0) {
    if (selector == 3.0) {
    if (selector == 4.0) {
    if (selector == 5.0) {