Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example from homepage lead to runtime error when trying revel command #1480

Open
lboulard opened this issue Dec 21, 2019 — with GitSpeak · 2 comments
Open

Example from homepage lead to runtime error when trying revel command #1480

lboulard opened this issue Dec 21, 2019 — with GitSpeak · 2 comments
Assignees
Labels
Projects
Milestone

Comments

Copy link

When running example in homepage https://revel.github.io/ using go 1.13.5:

go get github.com/revel/cmd/revel
git clone https://github.com/revel/examples $GOPATH/src/github.com/revel/examples
revel run github.com/revel/examples/chat

I only get a crash on Windows and Debian 10:

Windows:

 C:▶revel /v run github.com/revel/examples/chat
INFO  17:50:49   revel.go:94: Import path is absolute or not specified path=
INFO  17:50:49 command_config.go:133: Checking import path C:\Users\lboulard with C:\Users\lboulard\go
INFO  17:50:49   revel.go:94: Returned import path                     path= buildpath=C:\\Users\\lboulard\\go
INFO  17:50:49 command_config.go:301: Seeking remote package                   using= remote=github.com/revel/revel
INFO  17:50:49 command_config.go:301: Resolved called Seeking remote package   using= remote=github.com/revel/revel
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x6468dc]

goroutine 1 [running]:
github.com/revel/cmd/utils.FindSrcPaths(0x0, 0x0, 0x9434e8, 0x16, 0x0, 0xc00013c090, 0x0, 0x0, 0x4, 0x4, ...)
        C:/Users/lboulard/go/src/github.com/revel/cmd/utils/file.go:358 +0x3dc
github.com/revel/cmd/model.(*CommandConfig).SetVersions(0xc0000021e0, 0x941dca, 0x14)
        C:/Users/lboulard/go/src/github.com/revel/cmd/model/command_config.go:301 +0xd1
github.com/revel/cmd/model.(*CommandConfig).UpdateImportPath(0xc0000021e0, 0x11, 0x3)
        C:/Users/lboulard/go/src/github.com/revel/cmd/model/command_config.go:154 +0x5f5
main.main()
        C:/Users/lboulard/go/src/github.com/revel/cmd/revel/revel.go:94 +0x16f

Debian 10:

$ revel -v run github.com/revel/examples/chat
INFO  17:51:42   revel.go:94: Returned import path                     path=github.com/revel/examples/chat buildpath=/home/lboulard/go
INFO  17:51:42 command_config.go:301: Seeking app package                      app=github.com/revel/examples/chat
INFO  17:51:42 command_config.go:301: Seeking remote package                   using=github.com/revel/examples/chat remote=github.com/revel/revel
INFO  17:51:42 command_config.go:301: Resolved called Seeking remote package   remote=github.com/revel/revel  using=github.com/revel/examples/chat
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6524ba]

goroutine 1 [running]:
github.com/revel/cmd/utils.FindSrcPaths(0x7ffdf1d5446c, 0x1e, 0x949953, 0x16, 0x0, 0xc00012c090, 0x0, 0x0, 0x4, 0x4, ...)
        /home/lboulard/go/src/github.com/revel/cmd/utils/file.go:358 +0x3ca
github.com/revel/cmd/model.(*CommandConfig).SetVersions(0xc00010e000, 0x948439, 0x14)
        /home/lboulard/go/src/github.com/revel/cmd/model/command_config.go:301 +0xca
github.com/revel/cmd/model.(*CommandConfig).UpdateImportPath(0xc00010e000, 0xe, 0x3)
        /home/lboulard/go/src/github.com/revel/cmd/model/command_config.go:154 +0x5f3
main.main()
        /home/lboulard/go/src/github.com/revel/cmd/revel/revel.go:94 +0x160

@brendensoares brendensoares added the type-bug label Feb 8, 2020 — with GitSpeak
@brendensoares
Copy link
Member

@lboulard thanks for filing this issue. We'll have to look into it to verify the root cause. For now I've marked it as a bug.

@notzippy notzippy self-assigned this May 4, 2020
@notzippy notzippy added this to the v1.0.0 milestone May 4, 2020
@notzippy
Copy link
Collaborator

notzippy commented May 4, 2020

This is a documentation issue, the problem is that the folder needed to be added to the GOPATH in order to run the examples. I will update the example apps to resolve this for 1.0 release

@notzippy notzippy added this to In progress in Revel May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Revel
  
In progress
Development

No branches or pull requests

3 participants