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

wtfutil panics with SIGSEGV on module info #529

Closed
iNode opened this issue Aug 11, 2019 · 4 comments
Closed

wtfutil panics with SIGSEGV on module info #529

iNode opened this issue Aug 11, 2019 · 4 comments

Comments

@iNode
Copy link

iNode commented Aug 11, 2019

What's broken?

wtfutil crashes on request to get module info as per app usage. Binary is downloaded from the release page of repository. OS version - Ubuntu 18.04.

Maybe todo module is not available anymore and/or usage might be not up to date, but likely it should not panic.

$ wtfutil -v
0.19.1

$ wtfutil -h
Usage:
  wtfutil [OPTIONS]

Application Options:
  -c, --config=  Path to config file
  -m, --module=  Display info about a specific module, i.e.: 'wtf -m=todo'
  -p, --profile  Profile application memory usage
  -v, --version  Show version info

Help Options:
  -h, --help     Show this help message

$ wtfutil -m=todo
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x57c537]

goroutine 1 [running]:
github.com/olebedev/config.(*Config).Bool(0x0, 0x120d54f, 0x7, 0xc0001e1600, 0xc000039d00, 0xd)
        /Users/ccummer/go/pkg/mod/github.com/olebedev/[email protected]/config.go:147 +0x37
github.com/olebedev/config.(*Config).UBool(0x0, 0x120d54f, 0x7, 0xc00054969f, 0x1, 0x1, 0xd)
        /Users/ccummer/go/pkg/mod/github.com/olebedev/[email protected]/config.go:162 +0x3f
github.com/wtfutil/wtf/maker.MakeWidget(0x0, 0x0, 0x7fffe6a0d34f, 0x4, 0xc0001e4080, 0x40c478, 0x20)
        /Users/ccummer/go/src/github.com/wtfutil/wtf/maker/widget_maker.go:68 +0xe5
github.com/wtfutil/wtf/help.helpFor(0x7fffe6a0d34f, 0x4, 0xc0001e4080, 0x0, 0x0)
        /Users/ccummer/go/src/github.com/wtfutil/wtf/help/help.go:21 +0x4b
github.com/wtfutil/wtf/help.Display(0x7fffe6a0d34f, 0x4, 0xc0001e4080)
        /Users/ccummer/go/src/github.com/wtfutil/wtf/help/help.go:16 +0xb4
github.com/wtfutil/wtf/flags.(*Flags).RenderIf(0xc0003104e0, 0x1406900, 0x6, 0xc0001e4080)
        /Users/ccummer/go/src/github.com/wtfutil/wtf/flags/flags.go:39 +0xe2
main.main()
        /Users/ccummer/go/src/github.com/wtfutil/wtf/main.go:57 +0xc6

$ file ./wtfutil 
./wtfutil: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

Thanks for a good work. Please let me know if you need more information.

@senorprogrammer
Copy link
Collaborator

Looks like the module help flag is broken at the moment. The Todo module definitely still exists.

@Seanstoppable
Copy link
Collaborator

This looks like it specifically happens when a module is not in the config file, since we are trying to create a module to get it to spit out its own config.

@senorprogrammer
Copy link
Collaborator

That makes sense, and that’s definitely a bug.

@Seanstoppable
Copy link
Collaborator

Closed via #530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants