Hi,
I'm developing my first Go program that is supposed to upload files into a
Google Cloud Storage bucket from a Raspberry Pi 1. It uses the
https://github.com/blackjack/webcam library to grab a picture from an USB
camera.
I can compile the program on the Raspberry Pi itself with Go 1.7.4 that
comes with Raspbian, and then it works as expected. However compilation on
the Raspberry Pi is slow and it even sometimes fails because of memory
shortage. Therefore I want to cross-compile on Windows.
When I cross-compile the exact same source on Windows for ARM with Go
1.10.3, then this binary crashes at some point on the Raspberry Pi with a
segmentation fault:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x11520]
goroutine 8 [running]:
sync/atomic.addUint64(0x1236210c, 0x8a75f371, 0xa3f9cbd6, 0xdcd30e9,
0xda39e1c1)
C:/Go/src/sync/atomic/64bit_arm.go:31 +0x4c
go.opencensus.io/trace.(*defaultIDGenerator).NewSpanID(0x123620f0, 0x0, 0x0)
E:/Users/stm/go/src/go.opencensus.io/trace/trace.go:483 +0x50
go.opencensus.io/trace.startSpanInternal(0x123202d0, 0x22, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, ...)
E:/Users/stm/go/src/go.opencensus.io/trace/trace.go:196 +0x7c
go.opencensus.io/trace.StartSpan(0x4c4128, 0x12795c60, 0x123202d0, 0x22,
0x123798ec, 0x2, 0x2, 0x10, 0x40, 0x58f74)
E:/Users/stm/go/src/go.opencensus.io/trace/trace.go:162 +0x128
...
I'm a Go newbie, and therefore I'm not sure how to interpret this. May this
be a bug in the Go cross-compiler, or may this be a bug in the program that
only manifests itself when the program is cross-compiled with the newer
compiler on Windows? How can I analyze this?
Thanks
Stephan
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.