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

Linux invalid memory addres or nil pointer deference on strart #51

Open
nikto-b opened this issue Aug 21, 2019 · 2 comments
Open

Linux invalid memory addres or nil pointer deference on strart #51

nikto-b opened this issue Aug 21, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@nikto-b
Copy link

nikto-b commented Aug 21, 2019

Have crash at start after nothing changed (working config, open in vim, close vim, restart, not working config)
ArchLinux, linux 5.2.0, sampler v 1.0.2
Error:

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

goroutine 8 [running]:
main.verifyLicense(0xc000013c20, 0xc000013aa0)
	main.go:146 +0x2d
created by main.main
	main.go:107 +0x983

Config:

variables:
  sshconnection: ssh -C -i ~/.ssh/rsa_weak user@ip
runcharts:
  - title: Search engine response time
    init: $sshconnection
    pty: true
    position: [[0, 7], [40, 24]]
    rate-ms: 500
    legend:
        enabled: true
        details: false
    scale: 2
    items:
      - label: GOOGLE
        color: 178
        sample: curl -o /dev/null -s -w '%{time_total}'  https://www.google.com
      - label: YAHOO
        sample: curl -o /dev/null -s -w '%{time_total}'  https://search.yahoo.com
      - label: BING
        sample: curl -o /dev/null -s -w '%{time_total}'  https://www.bing.com
sparklines:
  - title: CPU usage
    position: [[40, 7], [40, 24]]
    rate-ms: 200
    scale: 0
    sample: ps -A -o %cpu | awk '{s+=$1} END {print s}'
  - title: Free memory pages
    position: [[0, 0], [80, 8]]
    rate-ms: 200
    scale: 0
    sample: free | rg 'Mem' | awk '{print $3}'

Fix:

rm -r ~/.config/Sampler
@sqshq sqshq added the bug Something isn't working label Aug 24, 2019
@traveling-developer
Copy link

Any news on this?
The fix does not work for me.
See the same error on mac os big sur

@traveling-developer
Copy link

Looks like it is because of an outdated dependency to github.com/kr/pty. This moved to https://github.com/creack/pty. And the bug was fixed with creack/pty#96
Is there a possibility that you update all dependencies and release a new version @sqshq ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants