realize icon indicating copy to clipboard operation
realize copied to clipboard

invalid memory address or nil pointer dereference

Open tonywangcn opened this issue 5 years ago • 1 comments

realize.yml

settings:
  legacy:
    force: true
    interval: 100ms
schema:
- name: project-name
  path: .
  commands:
    install:
      status: false
    run:
      status: true
  watcher:
    extensions:
    - go
    paths:
    - /
    ignored_paths:
    - .git
    - .realize
    - vendor

cmd: realize start

Realize version: 2.0.3

Golang Version

go version go1.12.7 linux/amd64

Error log:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45b457]

goroutine 7188 [running]:
fmt.(*buffer).WriteString(...)
	/usr/local/go/src/fmt/print.go:83
fmt.(*fmt).padString(0xc001fa2040, 0x0, 0x66)
	/usr/local/go/src/fmt/format.go:110 +0x90
fmt.(*fmt).fmtS(0xc001fa2040, 0x0, 0x66)
	/usr/local/go/src/fmt/format.go:347 +0x61
fmt.(*pp).fmtString(0xc001fa2000, 0x0, 0x66, 0x76)
	/usr/local/go/src/fmt/print.go:448 +0x132
fmt.(*pp).printArg(0xc001fa2000, 0x8e4700, 0xc001fc2a60, 0x76)
	/usr/local/go/src/fmt/print.go:684 +0x880
fmt.(*pp).doPrint(0xc001fa2000, 0xc000a85de8, 0x1, 0x1)
	/usr/local/go/src/fmt/print.go:1147 +0xfd
fmt.Sprint(0xc000a85de8, 0x1, 0x1, 0xc002d70820, 0xc002d70820)
	/usr/local/go/src/fmt/print.go:250 +0x52
github.com/fatih/color.(*Color).Sprint(0xc000a85ca8, 0xc000a85de8, 0x1, 0x1, 0x1, 0xc002d70820)
	/go/src/github.com/fatih/color/color.go:256 +0x3f
github.com/oxequa/realize/realize.colorBase.Regular(0x5e, 0xc000a85de8, 0x1, 0x1, 0xc002789f50, 0x29)
	/go/src/github.com/oxequa/realize/realize/style.go:27 +0xf5
github.com/oxequa/realize/realize.(*Project).Reload.func2(0xc0001b7800, 0xc000428600, 0xc00008e300)
	/go/src/github.com/oxequa/realize/realize/projects.go:253 +0x209
created by github.com/oxequa/realize/realize.(*Project).Reload
	/go/src/github.com/oxequa/realize/realize/projects.go:241 +0x258

What I did:

I used "realize start" to run the project for a long time in terminal, about 10 hours or some. There are about 10 logs per second printed out in the terminal.

tonywangcn avatar Aug 31 '19 16:08 tonywangcn

Try to spesific the command:

commands:
  install:
   status: true
   method: go build -o ouputfile youmainrun.go
  run:
   status: true
   method: ouputfile

riez avatar Feb 09 '20 00:02 riez