Hi @hizon. I believe the cause of the error is a corrupted core compilation cache file.
For the sake of efficiency, the Arduino IDE caches the compiled "core" (the code that defines the standard Arduino API) and libraries the first time you compile them for a given board. This means that all subsequent compilations for that board will be much faster because only the sketch needs to be compiled if the other components are already cached. Any available caches will be reused until the source files have changed, either due to you updating to a new version, or else editing them directly.
I'm not sure exactly why, but one rare occasions the archive files in the cache might get corrupted in some way. That causes this type of confusing error.
I think the most straightforward solution is to delete the file at this path:
Please be very careful when deleting things from your computer. When in doubt, back up!
C:\Users\INTEL\AppData\Local\Temp\arduino-core-cache\core_arduino_avr_uno_df83f6d5d05a15a4e6f20a13f5554071.a
If looking for it with your file browser or command line, note that the C:\Users\INTEL\AppData
folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
After deleting that file, try compiling a sketch once more. Hopefully the error will no longer occur.
Please let me know if you have any questions or problems.
In case you are interested to learn more about this subject, I'll share some additional information:
Arduino IDE 1.x deleted the cache when you exited the IDE. That made it easy to recover from a corrupted cache simply by restarting the IDE, but also meant that everything had to be recompiled at the start of each IDE session.
Arduino IDE 2.x does not do that cache removal on exit. This is the reason for the significant decreases in compilation time compared to Arduino IDE 1.x that some users have noted. Unfortunately this new "persistent cache" approach does make it less easy to recover from a corrupted cache.
The cache is stored in the system temporary folder, so this is dependent on how the operating system treats that folder. On my Linux machine, the operating system automatically clears the temporary folder when I restart the computer. On my Windows machine, the operating system never automatically clears the folder. This is the reason I suggested the approach of manually deleting the bad file.
An alternative fix would be to uninstall and then reinstall the boards platform that contains the core. This will cause the cache to be invalidated and a new cache generated on the next compile. I'm not sure whether it is a more user friendly approach. It can become more tricky in the case of 3rd party platforms which may reference the core from another platform.