Closed yanecc closed 6 months ago
What's worse, when local archiver = require("vfox.archiver")
is added, it impairs vfox more than the plugin concerned.
~> vfox list
panic: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x75bb15]
goroutine 1 [running]:
github.com/version-fox/vfox/internal.(*Sdk).Close(...)
github.com/version-fox/vfox/internal/sdk.go:448
github.com/version-fox/vfox/internal.(*Manager).Close(0xc000116270)
github.com/version-fox/vfox/internal/manager.go:189 +0x55
panic({0x7e0b40?, 0xd75f90?})
runtime/panic.go:914 +0x21f
github.com/version-fox/vfox/internal.(*Sdk).List(0x0)
github.com/version-fox/vfox/internal/sdk.go:390 +0x22
github.com/version-fox/vfox/cmd/commands.listCmd(0xc0000911c0)
github.com/version-fox/vfox/cmd/commands/list.go:51 +0x749
github.com/urfave/cli/v2.(*Command).Run(0xd8e160, 0xc0000911c0, {0xc00003d830, 0x1, 0x1})
github.com/urfave/cli/v2@v2.27.1/command.go:279 +0x9dd
github.com/urfave/cli/v2.(*Command).Run(0xc000186420, 0xc000090d80, {0xc00007e3c0, 0x2, 0x2})
github.com/urfave/cli/v2@v2.27.1/command.go:272 +0xc2e
github.com/urfave/cli/v2.(*App).RunContext(0xc000198200, {0x958f18?, 0xdee180}, {0xc00007e3c0, 0x2, 0x2})
github.com/urfave/cli/v2@v2.27.1/app.go:337 +0x5db
github.com/urfave/cli/v2.(*App).Run(...)
github.com/urfave/cli/v2@v2.27.1/app.go:311
github.com/version-fox/vfox/cmd.(*cmd).Execute(0x0?, {0xc00007e3c0?, 0x0?, 0x60?})
github.com/version-fox/vfox/cmd/cmd.go:39 +0x32
github.com/version-fox/vfox/cmd.Execute({0xc00007e3c0, 0x2, 0x2})
github.com/version-fox/vfox/cmd/cmd.go:30 +0x39
main.main()
github.com/version-fox/vfox/main.go:25 +0x28
Oops. My mistake. I only implemented it and did not register it in the Lua runtime.
Version 0.4.2
OS macOS、Linux、Windows
Describe the bug When
local archiver = require("vfox.archiver")
is used, it will cause errors.