-
-
Notifications
You must be signed in to change notification settings - Fork 18
Bugfix: Arduino Data Dir nil dereference #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bug: When dataDir is an empty string: paths.New() returns nil. next Canonical() get's called dereferencing nil. Fix: Ignore
CLA assistant check
All committers have signed the CLA.
@Kraiwin-Namsri Hello what version of the arduino-cli
are you running?
arduino-cli Version: 1.0.0 Commit: 05c9852a Date: 2024年06月12日T14:13:32Z
The version of arduino-cli
indeed seems to be the problem. When running arduino-cli config dump --format json
Output of 1.0.0:
{ "config": { "board_manager": { "additional_urls": [ "http://arduino.esp8266.com/stable/package_esp8266com_index.json" ] } } }
Following the output of 0.35.3:
{ "board_manager": { "additional_urls": [ "http://arduino.esp8266.com/stable/package_esp8266com_index.json" ] }, "build_cache": { "compilations_before_purge": 10, "ttl": 2592000000000000 }, "daemon": { "port": "50051" }, "directories": { "data": "/home/winus/.arduino15", "downloads": "/home/winus/.arduino15/staging", "user": "/home/winus/Arduino" }, "library": { "enable_unsafe_install": false }, "logging": { "file": "", "format": "text", "level": "info" }, "metrics": { "addr": ":9090", "enabled": true }, "output": { "no_color": false }, "sketch": { "always_export_binaries": false }, "updater": { "enable_notification": true } }
@Kraiwin-Namsri Thank you for your valuable feedback. It seems to be a problem with the arduino-cli 1.0.0. I'm escalating this internally.
For now, you can fallback on using the arduino-cli 0.53.3 or directly set that property in the arduino-cli config file. I'll come back to you as soon as we have released the fix 🙏
I've pushed a possible fix in #189. @Kraiwin-Namsri may you test it?
Superseded by #189
Bug
When
dataDir
is an empty string,paths.New(dataDir)
returnnil
, later de-referencingnil
.Logs:
Steps to reproduce
This needs work, as I am not entirely sure why this bug occurs on my system.
It seems like arduino-cli.yaml does not contain the dataFolder. Or at least
arduino-cli --config-file <file> config dump --format json
does not return the dataFolder.Extra information
I am using lvim together with mason. Mason installed arduino-language-server 0.7.6. Above logs describe the program.
Please feel free to leave a comment on how to improve this PR!
Kind regards,
Kraiwin