Skip to content
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

Arduino CLI panics when pluggable discovery tool crashes #2665

Closed
3 tasks done
dtomcat opened this issue Jul 14, 2024 · 3 comments · Fixed by #2707
Closed
3 tasks done

Arduino CLI panics when pluggable discovery tool crashes #2665

dtomcat opened this issue Jul 14, 2024 · 3 comments · Fixed by #2707
Assignees
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project

Comments

@dtomcat
Copy link

dtomcat commented Jul 14, 2024

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
@dtomcat dtomcat added the type: imperfection Perceived defect in any part of project label Jul 14, 2024
@cmaglie
Copy link
Member

cmaglie commented Sep 13, 2024

I think I've identified the issue, I'm preparing a fix for this problem.

@cmaglie
Copy link
Member

cmaglie commented Sep 13, 2024

@dtomcat
if you can still reproduce the issue, may you test the arduino-cli build here (scroll down at the bottom of the page): https://github.com/arduino/arduino-cli/actions/runs/10849485867?pr=2707

It contains a fix for the pluggable-discovery client.

@cmaglie cmaglie self-assigned this Sep 13, 2024
@dtomcat
Copy link
Author

dtomcat commented Sep 13, 2024

I’ve disassembled the setup and have a few projects… I’m not sure when I’ll have time… but can definitely give it a go when I do have the time if someone else hasn’t done so. Thank you for the fix!

@per1234 per1234 added topic: code Related to content of the project itself status: waiting for information More information must be provided before work can proceed labels Oct 5, 2024
@per1234 per1234 changed the title Burn-bootloader does not work with RP2040 boards added Arduino CLI panics when pluggable discovery tool crashes Oct 5, 2024
@per1234 per1234 removed the topic: code Related to content of the project itself label Oct 5, 2024
@per1234 per1234 added conclusion: resolved Issue was resolved and removed status: waiting for information More information must be provided before work can proceed labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants