Skip to content

Crash when requesting platforms list over gRPC #1434

Closed
@4ntoine

Description

@4ntoine

Bug Report

Current behavior

via gRPC - requesting the list of platforms

it crashes with the stacktrace:

> arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x47ca4ba]

goroutine 8 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
	github.com/arduino/arduino-cli/commands/core.go:31 +0x3a
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc00124ab00, 0xc0011e5b00, 0x0, 0xc000559b10, 0x400dd25, 0x4b20a40)
	github.com/arduino/arduino-cli/commands/core/list.go:54 +0x1c5
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).PlatformList(0xc0001b3fc0, 0x4ca1a70, 0xc0012ae3c0, 0xc00124ab00, 0xc0001b3fc0, 0xc0012ae3c0, 0xc000065b80)
	github.com/arduino/arduino-cli/commands/daemon/daemon.go:272 +0x2f
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_PlatformList_Handler(0x4b413a0, 0xc0001b3fc0, 0x4ca1a70, 0xc0012ae3c0, 0xc001277500, 0x0, 0x4ca1a70, 0xc0012ae3c0, 0xc0010dff90, 0x6)
	github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1/commands.pb.go:3834 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000083380, 0x4cab8d8, 0xc000001b00, 0xc0011e5b00, 0xc00023edb0, 0x5220ea0, 0x0, 0x0, 0x0)
	google.golang.org/[email protected]/server.go:1024 +0x522
google.golang.org/grpc.(*Server).handleStream(0xc000083380, 0x4cab8d8, 0xc000001b00, 0xc0011e5b00, 0x0)
	google.golang.org/[email protected]/server.go:1313 +0xd4c
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00032e030, 0xc000083380, 0x4cab8d8, 0xc000001b00, 0xc0011e5b00)
	google.golang.org/[email protected]/server.go:722 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:720 +0xa5

Expected behavior

Expected to have a response

Environment

  • CLI version (output of arduino-cli version):
> arduino-cli version
arduino-cli alpha Version: 0.18.3 Commit: d710b642 Date: 2021-05-21T17:04:33Z
  • OS and platform:
    macOS mojave 10.14.6

Additional context

Metadata

Metadata

Assignees

Labels

topic: gRPCRelated to the gRPC interfacetype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions