V2.32 Bugs

So I thought I would start a bug thread.

The following code will not set the value of Mytests.number to 3, uncommenting the “dummy” variable allows the code to work.

struct {
    //int     dummy;
    int     number;
    string  DisplayText[10];
} DiagTests;

DiagTests MyTests;

void    InitTests( DiagTests &t )
    t.DisplayText[0] = "Versions        ";
    t.DisplayText[1] = "Joystick Test   ";
    t.DisplayText[2] = "Motor Test 1    ";


task main()
    InitTests( MyTests );

The following warnings seem to be in conflict. Are inline functions supported or not ? ClearLcd is a function called from two different tasks. Only one of the two tasks is started so calling from two places is not a problem, however, I would like to resolve the warning.

Warning:‘inline’ not supported, changing to normal function call.
Warning:Use ‘inline’ to avoid possible simultaneous variable memory access conflicts for subroutine ‘ClearLcd’ called from multiple tasks ‘ShowVersions’ and ‘MotorTest’?

Thanks for the feedback and keep it coming! We’ll take a look and add fixes to a ROBOTC update.

Couple more small issues.

I created a new toolbar and added the “Compile Program” menu item to it (hitting F7 is a pain as I’m running under parallels desktop), this works ok but every time the debugger is entered and exited a duplicate of this toolbar is created. Adding the item to an existing toolbar does not have this issue.

The “Create Executable file on PC” compiler preference does not seem to do anything, at least I cannot find any executable files. It would be useful to be able to keep copies of compiled code for downloading under the file management dialog.

On the subject of file management we really could use better support for this under program control. I understand the issues of the flash erase/program having a limited life, however, even in the absence of a flash translation layer or any wear leveling there are ways to circumvent possible long term damage. As a first step, file reading would be useful, however, the real need is for non volatile storage of user parameters such as alliance color so these can be preset before competition. Perhaps a way to mitigate out of control software constantly writing to flash would be to only allow one write per program execution. Anyway, I have looked for creative ways around this but at the end of the day we need read/write access to flash even if it’s only for certain predefined pages.

This does not work.

StartTaskWithPriority( task1, kLowPriority );

The compiler gives an error.

Error:Undefined procedure ‘StartTaskWithPriority’.

This will compile

StartTask( task1, kLowPriority );

But gives a runtime error.

Program slot 0, Task ID: main(0)
Error at PC:BAD_LOC+0x0061
Task PC: Task main+0x005B
TaskState: ‘Exception’
Exception Type: ‘Task number out of Range[23]’


StartTask( task1 )

Works correctly, however, I want to run with a non default priority.

The documentation implies it should work.

Here is some trivial code that will give the error.

#pragma config(Sensor, dgtl1,  DigiOut,             sensorDigitalOut)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task task1()
        SensorValue DigiOut ] = 1;

task main()
    StartTask( task1, kLowPriority );

        SensorValue DigiOut ] = 0;

setTaskPriority gives a run time error.
getTaskPriority gives a run time error.

Not a bug per se, but the following does not compile.

int x, y;

for(x=0, y=10; x<10; x++, y++)
    // Do something ...

I guess multiple loop initializations are not allowed.

Jesse, some feedback would be useful, any chance of beta testing the next release :slight_smile:

Hi jpearman,

Thanks again for the continued feedback - I’ve been testing the bugs you’ve found and passing them on to the rest of the development team. They should all be solved in the next release.

The next release isn’t quite ready for prime-time, but if you message me your contact info I can include you in the testing group when we get to that stage.

Thanks again.