Inventory.yaml edge case can break structure and prevent Arduino IDE 2.0 from starting #2229
Closed
3 tasks done
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Milestone
Describe the problem
While investigating an IDE 2 startup failure we noticed that starting the IDE via command line would output a mention to
inventory.yaml
and the offending error kept on repeating until the process was halted.Deleting
inventory.yaml
allowed the IDE to start successfully.I have spent some time trying to break it and found out that adding a character that breaks a string can prevent the CLI from successfully loading it and returning this error:
The error came after some heavy fiddling with a platform relying on the presence of MingW32 (Windows) being installed (with failure) on a Mac OS machine, but trying to reinstall it, compile and other operations did not end up breaking the inventory file, so this might as well be an edge case not easy to come by.
To reproduce
Launch IDE, quit and open
~/Library/Arduino15
(different path on Windows/Linux)break one of the strings adding a random
'
character into it as in(notice the
?'
sequence afterWCH;32
)run some CLI operation such as
arduino-cli core list
Expected behavior
In case a broken inventory file is encountered, the CLI should clear its content and gracefully handle it.
Arduino CLI version
0.33.0
Operating system
macOS
Operating system version
Ventura
Additional context
Arduino forum: https://forum.arduino.cc/t/macos-m1-arduino-ide-2-0-3-is-not-working-anymore/1078952/13
Issue checklist
The text was updated successfully, but these errors were encountered: