Skip to content

Arduino CLI panics when pluggable discovery tool crashes #2665

Closed
@dtomcat

Description

@dtomcat

Describe the problem

Trying to burn bootloader to atmega32u4; but fails because trying to kill process discovery = rp2040. when I remove that board type, It functions perfectly.

To reproduce

install Rapsberry pi pico/RP2040 board types by "Earle F. Philhower, III" and try to burn a bootloader.

Expected behavior

Should burn the bootloader to the atmega32U4

Arduino CLI version

1.0.2

Operating system

Windows

Operating system version

Latest updates

Additional context

INFO[0007] Executing `arduino-cli burn-bootloader`
ERRO[0008] Killing discovery process: TerminateProcess: Access is denied.  discovery=rp2040
ERRO[0008] Waiting discovery process termination: exit status 0xc0000409  discovery=rp2040
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0xbe7f5e]

goroutine 44 [running]:
github.com/arduino/pluggable-discovery-protocol-handler/v2.(*Client).Run(0xc0001f8870)
        /go/pkg/mod/github.com/arduino/pluggable-discovery-protocol-handler/v2@v2.2.0/client.go:281 +0x19e
github.com/arduino/arduino-cli/internal/arduino/discovery/discoverymanager.(*DiscoveryManager).startDiscovery(0xc000244050, 0xc0001f8870)
        /home/build/internal/arduino/discovery/discoverymanager/discoverymanager.go:203 +0x95
github.com/arduino/arduino-cli/internal/arduino/discovery/discoverymanager.(*DiscoveryManager).Start.func2(0x736169626f742f6d?)
        /home/build/internal/arduino/discovery/discoverymanager/discoverymanager.go:105 +0x3c
created by github.com/arduino/arduino-cli/internal/arduino/discovery/discoverymanager.(*DiscoveryManager).Start in goroutine 1
        /home/build/internal/arduino/discovery/discoverymanager/discoverymanager.go:104 +0x1ae

Additional reports

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions