-
Notifications
You must be signed in to change notification settings - Fork 584
Description
Describe the problem
Same thing has happened to me a few times this week.
I have a semi colon at the end of my line but I get this error with the line number:
error: expected ';' before '}' token
I go to the line above that curly bracket, which does have a semicolon, and I erase the semicolon and retype it and it compiles.
The last time it happened, I compiled 3 times in a row without changing anything and it still error'd so I don't think it ran the code before autosave completed.
To reproduce
Just happens randomly.
I tried erasing the semicolon, typing it again and hitting CTRL+SHIFT+U to compile and upload really fast and beat the autosave but seems like it saves before compile anyway.
Expected behavior
No error when there is a semicolon at the end of the line
Arduino IDE version
2.3.8
Operating system
Windows
Operating system version
Windows 11
Additional context
I didn't verify on nightly build because I can't reproduce it.
Related
- https://forum.arduino.cc/t/problem-with-using-saveas/1191801
- https://forum.arduino.cc/t/ide-adding-garbage-to-end-of-sketch/1202097
- https://forum.arduino.cc/t/sketch-corruption-in-the-ide-editor/1269713
- https://forum.arduino.cc/t/ide-bug-displayed-code-does-not-match-what-is-actually-there/1280993
- https://forum.arduino.cc/t/ide-2-3-3-randomly-corrupting-files-while-editing/1290146/1
- https://forum.arduino.cc/t/ide-2-3-3-randomly-corrupting-files-while-editing/1290146/7
- Sketch content sometimes lost on save to Synology Cloud Drive #2819
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details