Skip to content

Fwupload crash if the tools for the current OS are missing #211

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

Closed
3 tasks done
cmaglie opened this issue Aug 21, 2023 · 0 comments · Fixed by #214
Closed
3 tasks done

Fwupload crash if the tools for the current OS are missing #211

cmaglie opened this issue Aug 21, 2023 · 0 comments · Fixed by #214
Assignees
Labels
type: imperfection Perceived defect in any part of project

Comments

@cmaglie
Copy link
Member

cmaglie commented Aug 21, 2023

Describe the problem

This is the panic as reported by an user of the Arduino Create Agent:

  "Msg": "panic: runtime error: invalid memory address or nil pointer dereference",
  "Msg": "[signal 0xc0000005 code=0x0 addr=0x20 pc=0x90475d]",
  "Msg": "",
  "Msg": "goroutine 1 [running]:",
  "Msg": "github.com/arduino/arduino-cli/arduino/resources.(*DownloadResource).ArchivePath(0x0, 0x125125c0)",
  "Msg": "    /home/runner/go/pkg/mod/github.com/arduino/[email protected]/arduino/resources/helpers.go:27 +0x2d",
  "Msg": "github.com/arduino/arduino-fwuploader/indexes/download.DownloadTool(0x1281a0c0)",
  "Msg": "    /home/runner/work/arduino-fwuploader/arduino-fwuploader/indexes/download/download.go:57 +0x295",
  "Msg": "github.com/arduino/arduino-fwuploader/cli/common.downloadTool(0x126e3450, {0x1265e1e0, 0x16})",
  "Msg": "    /home/runner/work/arduino-fwuploader/arduino-fwuploader/cli/common/common.go:129 +0xd1",
  "Msg": "github.com/arduino/arduino-fwuploader/cli/common.DownloadRequiredToolsForBoard(0x126e3450, 0x127d6870)",
  "Msg": "    /home/runner/work/arduino-fwuploader/arduino-fwuploader/cli/common/common.go:118 +0x9f",
  "Msg": "github.com/arduino/arduino-fwuploader/cli/firmware.runFlash(0x1246fce0, {0x125468c0, 0x0, 0x7})",
  "Msg": "    /home/runner/work/arduino-fwuploader/arduino-fwuploader/cli/firmware/flash.go:81 +0xfc",
  "Msg": "github.com/spf13/cobra.(*Command).execute(0x1246fce0, {0x12546880, 0x7, 0x8})",
  "Msg": "    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x645",
  "Msg": "github.com/spf13/cobra.(*Command).ExecuteC(0x1246f8c0)",
  "Msg": "    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x403",
  "Msg": "github.com/spf13/cobra.(*Command).Execute(...)",
  "Msg": "    /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902",
  "Msg": "main.main()",
  "Msg": "    /home/runner/work/arduino-fwuploader/arduino-fwuploader/main.go:34 +0x47",
  "Msg": "Executing command: exit status 2",

To reproduce

Try to run the fw flash using an OS for which the required tools are unavailable.

Expected behavior

fwupload should exit clleanly with an error message like: "Tool xxxx is not available for you OS yyyy"

Arduino Firmware Uploader version

nightly

Operating system

N/A

Operating system version

N/A

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@cmaglie cmaglie added the type: imperfection Perceived defect in any part of project label Aug 21, 2023
kittaakos pushed a commit to arduino/arduino-ide that referenced this issue Aug 22, 2023
kittaakos pushed a commit to arduino/arduino-ide that referenced this issue Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
2 participants