Bug in V5 VEXos with Program Descriptions

There’s a bug in the V5 code when processing long words in descriptions. When making a description for your program, a string of characters not separated by spaces that’s longer than 77 characters will cause the entire brain to crash and lock up. It is only triggered when attempting to run any program, going to the run screen (sometimes), and opening the event log. It only suspectable to a crash after the run screen for the program has been open. It also causes the motor graphs to be messed up as well depending on the length (only when very long, not just 78 characters), suggesting a possible buffer overflow. The description itself can be longer than 77 characters, just as long as the words inside of it are shorter than 78 characters. This means that the error lies in the code figuring out the length of the word and where to put it in the description box on the run screen. The longest word that will ever be displayed on the run screen is 24 characters long and anything between 24-77 works fine, just is not displayed. I don’t really expect this to happen to anyone, but it is a bug nonetheless. Also as a side note for reference, the .ini file for programs cannot be longer than 4096 bytes, otherwise, VEXos will refuse to read it and not show your program. Maybe @jpearman and the team can get this fixed next update, even though it’s not really a big deal.

3 Likes

Just remember that .ini files were not designed for end users to play with, all relevant details were shared with our development partners. You may end up bricking the brain if you add random additional text to the .ini file and cause these types of buffer overflows.

4 Likes