I have an Arduino project that has been in service for over a decade, and I only recently got back into this hobby in the last month.
After upgrading to IDE 2.1.0 I believe I have found a bug.
Symptoms:
During compilation I will randomly get an error. The error might indicate a lack of a ;
, or a variable that has not been declared, for example, let's sat I have the following declaration:
int someVariable = 0;
During compilation I might get an error such as:
'someVa' has not been declared.
The compiler is missing the rest of the variable name!
I can see the full variable in my code. One way around this is to highlight the affected code, cut, then paste. This clears the error.
I have encountered this problem on three different computers, on both the full install and the portable version.
It tends to do this most often at the end of the file. When I first experienced this, the error was missing '}' at the end of the program. I found I could compile if I added a redundant closing curly brace which really puzzled me.
I have found the best way around this is to add a bunch of line feeds at the end of the program.
Regards,
Magma