Hi,
I have been starting using arduino-cli (using the bash terminal in visual studio code), and compiled and uploaded several old sketches without any issues. Then I tried to compile sketches with 3rd party libraries and updated my .yaml file for that.
After trying to compile one sketch with a library that was not found I just get this error (does not matter which command or sketch i tried to use):
$ arduino-cli update
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x54bb22]
goroutine 1 [running]:
github.com/arduino/go-paths-helper.(*Path).Join(0x0, 0xc0004db6d8, 0x1, 0x1, 0x0)
/github/home/go/pkg/mod/github.com/arduino/go-paths-helper@v1.3.2/paths.go:83 +0x52
github.com/arduino/arduino-cli/configuration.HardwareDirectories(0xc00003a891, 0x22, 0x7)
/__w/arduino-cli/arduino-cli/configuration/directories.go:44 +0x18f
github.com/arduino/arduino-cli/arduino/cores/packagemanager.(*PackageManager).LoadHardware(0xc0002f2080, 0xc0003e6700, 0x0)
/__w/arduino-cli/arduino-cli/arduino/cores/packagemanager/loader.go:33 +0x2d
github.com/arduino/arduino-cli/commands.createInstance(0x10781a0, 0xc0000340d0, 0xdffe00, 0xc0002f4001, 0xc0002e60d0, 0xc000269988)
/__w/arduino-cli/arduino-cli/commands/instances.go:635 +0x893
github.com/arduino/arduino-cli/commands.Init(0x10781a0, 0xc0000340d0, 0xc0004dbad8, 0xc0002f4040, 0xc0002e60d0, 0x400, 0x203000000000000, 0x50)
/__w/arduino-cli/arduino-cli/commands/instances.go:134 +0x5c
github.com/arduino/arduino-cli/cli/instance.getInitResponse(0xc0002f8000, 0x50, 0x48)
/__w/arduino-cli/arduino-cli/cli/instance/instance.go:47 +0xd1
github.com/arduino/arduino-cli/cli/instance.CreateInstanceIgnorePlatformIndexErrors(...)
/__w/arduino-cli/arduino-cli/cli/instance/instance.go:31
github.com/arduino/arduino-cli/cli/update.runUpdateCommand(0xc0002a4000, 0x17244e8, 0x0, 0x0)
/__w/arduino-cli/arduino-cli/cli/update/update.go:52 +0x3e
github.com/spf13/cobra.(*Command).execute(0xc0002a4000, 0x17244e8, 0x0, 0x0, 0xc0002a4000, 0x17244e8)
/github/home/go/pkg/mod/github.com/spf13/cobra@v1.0.1-0.20200710201246-675ae5f5a98c/command.go:846 +0x2b1
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001badc0, 0x0, 0xd6b0a0, 0xc00003c0b8)
/github/home/go/pkg/mod/github.com/spf13/cobra@v1.0.1-0.20200710201246-675ae5f5a98c/command.go:950 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
/github/home/go/pkg/mod/github.com/spf13/cobra@v1.0.1-0.20200710201246-675ae5f5a98c/command.go:887
main.main()
/__w/arduino-cli/arduino-cli/main.go:31 +0x3d
i know there are questions with the same error, but those were caused by a particular sketch, I repeat myself maybe, but right now i cannot run any command on arduino-cli (not even arduino-cli update)
I have a windows 10 laptop and arduino 1.8.15 installed. My arduino IDE is fine and it works normally, the problem i am facing is with the arduino-cli.
is there any way to refresh the arduino-cli? I dont think I have to reinstall the arduino IDE.
Thank you very much in advance.
here my arduino-cli.yaml
board_manager:
additional_urls:
- https://raw.githubusercontent.com/VSChina/azureiotdevkit_tools/master/package_azureboard_index.json
- http://arduino.esp8266.com/stable/package_esp8266com_index.json
- https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
- https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
- https://dl.espressif.com/dl/package_esp32_index.json
- https://mcudude.github.io/MicroCore/package_MCUdude_MicroCore_index.json
- https://raw.githubusercontent.com/sleemanj/optiboot/master/dists/package_gogo_diy_attiny_index.json
daemon:
port: "50051"
directories:
data: C:\Users\ocamp\AppData\Local\Arduino15
downloads: C:\Users\ocamp\AppData\Local\Arduino15\staging
user:
- C:\Users\ocamp\OneDrive\Documents\Arduino
- C:\Users\ocamp\Documents\IoTanks\Repo_2021\libraries
logging:
file: ""
format: text
level: info
telemetry:
addr: :9090
enabled: true
i already downloaded the arduino-cli and copied the executable and license under the same directory and still the same issue, i also stripped down the .yaml without all the additional urls and the problem is consistent. No matter what i put in the command line, i get the same error