Bugfix: Arduino Data Dir nil dereference#188
Closed
Kraiwin-Namsri wants to merge 2 commits intoarduino:mainfrom
Closed
Bugfix: Arduino Data Dir nil dereference#188Kraiwin-Namsri wants to merge 2 commits intoarduino:mainfrom
Kraiwin-Namsri wants to merge 2 commits intoarduino:mainfrom
Conversation
Bug: When dataDir is an empty string: paths.New() returns nil. next Canonical() get's called dereferencing nil. Fix: Ignore
Contributor
|
@Kraiwin-Namsri Hello what version of the |
Author
|
arduino-cli Version: 1.0.0 Commit: 05c9852a Date: 2024-06-12T14:13:32Z |
Author
|
The version of 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
}
} |
Contributor
|
@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. |
3 tasks
3 tasks
Member
|
I've pushed a possible fix in #189. @Kraiwin-Namsri may you test it? |
Member
|
Superseded by #189 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
When
dataDiris 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 jsondoes 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