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

Runtime error #1000

Closed
jhautefeuille opened this issue Dec 6, 2022 · 1 comment
Closed

Runtime error #1000

jhautefeuille opened this issue Dec 6, 2022 · 1 comment

Comments

@jhautefeuille
Copy link

jhautefeuille commented Dec 6, 2022

  • bettercap v2.32.0
  • Ubuntu 22.04 LTS
  • go version go1.19 linux/amd64

bettercap v2.32.0 (built for linux amd64 with go1.19) [type 'help' for a list of commands]

panic: runtime error: index out of range [0] with length 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xd2064f]

goroutine 1 [running]:
github.com/bettercap/bettercap/session.(*Session).Close(0xc0000fee00)
/tmp/bettercap/session/session.go:190 +0xef
panic({0x11513c0, 0xc00003b5d8})
/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/bettercap/bettercap/routing.update()
/tmp/bettercap/routing/update_linux.go:40 +0x5e5
github.com/bettercap/bettercap/routing.Update()
/tmp/bettercap/routing/tables.go:19 +0x7c
github.com/bettercap/bettercap/routing.Gateway({0x11b5914, 0x4}, {0xc000a0f6b0, 0xf})
/tmp/bettercap/routing/tables.go:23 +0x6b
github.com/bettercap/bettercap/network.FindGateway(0xc00021d200)
/tmp/bettercap/network/net_gateway.go:10 +0x3c
github.com/bettercap/bettercap/session.(*Session).Start(0xc0000fee00)
/tmp/bettercap/session/session.go:254 +0x2ce
main.main()
/tmp/bettercap/main.go:49 +0x458

@johnkravicz
Copy link

johnkravicz commented Jul 20, 2023

Having exactly the same problem here.

Fixed using 44e2420

$ sudo bettercap 
bettercap v2.32.0 (built for linux amd64 with go1.18.1) [type 'help' for a list of commands]

panic: runtime error: index out of range [0] with length 0
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xd06d2f]

goroutine 1 [running]:
github.com/bettercap/bettercap/session.(*Session).Close(0xc000198fc0)
	/home/user/programmes/bettercap/session/session.go:190 +0xef
panic({0x112f760, 0xc0008141b0})
	/usr/lib/go-1.18/src/runtime/panic.go:838 +0x207
github.com/bettercap/bettercap/routing.update()
	/home/user/programmes/bettercap/routing/update_linux.go:40 +0x5dc
github.com/bettercap/bettercap/routing.Update()
	/home/user/programmes/bettercap/routing/tables.go:19 +0x7c
github.com/bettercap/bettercap/routing.Gateway({0x1192b8f, 0x4}, {0xc0009073a2, 0x9})
	/home/user/programmes/bettercap/routing/tables.go:23 +0x6b
github.com/bettercap/bettercap/network.FindGateway(0xc000233200)
	/home/user/programmes/bettercap/network/net_gateway.go:10 +0x3c
github.com/bettercap/bettercap/session.(*Session).Start(0xc000198fc0)
	/home/user/programmes/bettercap/session/session.go:254 +0x2ab
main.main()
	/home/user/programmes/bettercap/main.go:49 +0x458

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