Skip to content

JobSpawn crashes when passed null for onExit #3570

@redfire75369

Description

@redfire75369

Description of the problem or steps to reproduce

Create a plugin with shell.JobSpawn that takes in nil as onExit

shell.JobSpawn("curl", args, nil, nil, nil)

Micro crashes with

Micro encountered an error: runtime.errorString runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:260 (0x24ecd6)
runtime/panic.go:259 (0x24eca6)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:423 (0x6e566b)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:400 (0x6e5251)
runtime/proc.go:250 (0x23c95e)
runtime/asm_amd64.s:1594 (0x26a0c1)

If you can reproduce this error, please report it at https://github.com/zyedidia/micro/issues

Specifications

Version: 2.0.14
Commit hash: 04c5770
OS: Windows
Terminal: Windows Terminal/Command Prompt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions