Skip to content

SIGSEGV running 'board attach' with fqbn in 0.3.6-alpha.preview #165

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
neophiliac opened this issue Mar 8, 2019 · 0 comments · Fixed by #432
Closed

SIGSEGV running 'board attach' with fqbn in 0.3.6-alpha.preview #165

neophiliac opened this issue Mar 8, 2019 · 0 comments · Fixed by #432
Assignees
Milestone

Comments

@neophiliac
Copy link

neophiliac commented Mar 8, 2019

$ arduino-cli board attach esp8266:esp8266:generic 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x8d10c1]

goroutine 1 [running]:
github.com/arduino/arduino-cli/commands/board.runAttachCommand(0xc000137400, 0xc000065570, 0x1, 0x1)
	$GOCODE/src/github.com/arduino/arduino-cli/commands/board/attach.go:82 +0x1e1
github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc000137400, 0xc000065540, 0x1, 0x1, 0xc000137400, 0xc000065540)
	$GOCODE/src/github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra/command.go:766 +0x2ae
github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000136f00, 0x93dcec, 0xc00014ff88, 0xc000034118)
	$GOCODE/src/github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra/command.go:852 +0x2c0
github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra.(*Command).Execute(...)
	$GOCODE/src/github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra/command.go:800
main.main()
	$GOCODE/src/github.com/arduino/arduino-cli/main.go:30 +0x28

I replaced the GOCODE portion of the paths, obviously.

The line of code in question is the assignment in this block:

if fqbn != nil {
		sketch.Metadata.CPU = sketches.BoardMetadata{
			Fqbn: fqbn.String(),
		}

So it found the fqbn in the args, but can't turn it into a string? This is exactly the example command line for 'board attach' with a different fqbn. Any hints will be appreciated.

Also, is there any documentation for 'board attach'?

@per1234 per1234 added the bug label May 24, 2019
@masci masci self-assigned this Aug 16, 2019
@cmaglie cmaglie added this to the 0.6.0 milestone Sep 12, 2019
@masci masci closed this as completed in #432 Oct 1, 2019
per1234 pushed a commit that referenced this issue Nov 16, 2020
per1234 added a commit that referenced this issue Aug 9, 2021
Correct readme filename regular expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants