cloudfoundry / cloudfoundry/multiapps-cli-plugin

cf deploy of mta file throwing panic: runtime error: invalid memory address or nil pointer dereference

Open
#220 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in progress
Dominant language
Go
Stars
87
Forks
42
Avg merge
17d 21h
Merged PRs (30d)
1

Description

Description

Describe your issue here. What is the expected behavior? What is the actual behavior?

Your environment
Steps to reproduce

build project using Cloud MTA Build Tool version 1.2.33.
Command used mbt build

After build, deploy the mta file using:
cf deploy mta_archives/xxx.mta
It is throwing the following error:

_panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0xa176ac]

goroutine 1 [running]:
github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands.(*DeployCommand).getMtaArchive(0xb380d3?, {0xc0004126a0?, 0xc16818?, 0x1?}, {0x6?, 0x83?})
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands/deploy_command.go:543 +0x16c
github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands.(*DeployCommand).executeInternal(0xc000342540, {0xc0004126a0, 0x1, 0x1}, {0xc00001ce40, 0x2c}, 0xc000400780, {{{{0xc0004389c0, 0x24}, {0xc00040e810, ...}, ...}}, ...})
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands/deploy_command.go:239 +0x205
github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands.(*BaseCommand).Execute(0xc000191560, {0xc0000360b0, 0x1, 0x1})
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands/base_command.go:122 +0x57a
main.(*MultiappsPlugin).Run(0xb39de3?, {0xc258f0, 0xc0002e7ba0}, {0xc0000360a0, 0x2, 0x2})
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/multiapps_plugin.go:45 +0x1e9
code.cloudfoundry.org/cli/plugin.Start({0xc1d658, 0x10b8180})
/root/go/pkg/mod/code.cloudfoundry.org/cli@v7.1.0+incompatible/plugin/plugin_shim.go:34 +0x309
main.main()
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/multiapps_plugin.go:65 +0x27_

Additional information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in commands/deploy_command.go at getMtaArchive line 543, then follow executeInternal at line 239. Reproduce with Cloud MTA Build Tool 1.2.33 and cf deploy mta_archives/xxx.mta using the listed versions. Done means the command no longer panics during MTA archive deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.