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

Segmentation Fault on Raspberry pi #30

Open
alexdetrano opened this issue Jan 16, 2019 · 3 comments
Open

Segmentation Fault on Raspberry pi #30

alexdetrano opened this issue Jan 16, 2019 · 3 comments

Comments

@alexdetrano
Copy link

alexdetrano commented Jan 16, 2019

I am trying to run the scanner on a raspberry pi 3b+ and also a pi0w; in both instances I get a seg fault. I changed the name, family, and server below for privacy reasons.

pi@raspberrypi:~ $ sudo find3-cli-scanner -i wlan0 -d <name> -f <family> -server <server> -scantime 10 -bluetooth
2019-01-15 20:12:36 [INFO] main.go func1:212 scanning bluetooth
2019-01-15 20:12:36 [INFO] main.go func1:218 scanning for 10 seconds
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c pc=0x397248]

goroutine 1 [running]:
main.postData(0x543797d8, 0x168, 0x7efa4859, 0x6, 0x7efa484d, 0x8, 0x0, 0x0, 0x1cfc100, 0x0, ...)
	/home/pi/go/src/github.com/schollz/find3-cli-scanner/server-main.go:59 +0x220
main.basicCapture(0x4701d9, 0x17)
	/home/pi/go/src/github.com/schollz/find3-cli-scanner/main.go:369 +0x640
main.main.func1(0x1cae370, 0x1cae370, 0x1cc7b40)
	/home/pi/go/src/github.com/schollz/find3-cli-scanner/main.go:219 +0x5e0
github.com/urfave/cli.HandleAction(0x3e05f0, 0x488d1c, 0x1cae370, 0x1c8e600, 0x0)
	/home/pi/go/src/github.com/urfave/cli/app.go:501 +0xac
github.com/urfave/cli.(*App).Run(0x1c01500, 0x1c16060, 0xc, 0xc, 0x0, 0x0)
	/home/pi/go/src/github.com/urfave/cli/app.go:268 +0x400
main.main()
	/home/pi/go/src/github.com/schollz/find3-cli-scanner/main.go:232 +0x920

I should mention that I installed go manually

pi@raspberrypi:~ $ go version
go version go1.11.4 linux/arm

And also followed the instructions at https://www.internalpositioning.com/doc/cli-scanner.md for installing the tool.

I couldn't get docker to run properly on the pi either.

@muelli
Copy link

muelli commented Jun 25, 2019

seems the error is not checked there:

req, err := http.NewRequest("POST", url, bytes.NewBuffer(bPayload))
req.Header.Set("Content-Type", "application/json")

Can you try whether it crashes when you check for the error like this, maybe?

if err != nil {
return
}

@nash-stokes
Copy link
Contributor

I am having this issue as well. Mine collects the packets, but when it starts the second scan, it segfaults in the same way. The same device is able to passive scan fine if I set the server to the default cloud.internalpositioning, so I'm wondering if the docker image for find3 server is missing something.

@nash-stokes
Copy link
Contributor

After the most recent commit, mine is working @alexdetrano

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

No branches or pull requests

3 participants