Hundemeier / go-sacn

Implementation of the sACN aka ANSI E1.31 protocol for streaming DMX-data in go
MIT License
16 stars 9 forks source link

Receiving / Transmitting on same Host #3

Closed localleon closed 6 years ago

localleon commented 6 years ago

OS: Linux Version: latest

If you run a sACN-Receiver on your Host and the start a sACN-Transmitter. You get the following error.

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

goroutine 1 [running]:
github.com/Hundemeier/go-sacn/sacn.NewTransmitter(0x0, 0x0, 0x35c1711ec70da98e, 0xb1f8cce947e4eb8e, 0x53431f, 0x8, 0, 0x0, 0x0, 0x0, ...)
        /home/linuxleon/bin/Golang/src/github.com/Hundemeier/go-sacn/sacn/transmitter.go:43 +0x19a
main.main()
        /home/linuxleon/bin/key2sACN/key2sacn.go:43 +0x2e7

You can reproduce the error with the sample code.

Hundemeier commented 6 years ago

This is because multiple processes can not listen via UDP on the same port. The error you are facing is actually a null pointer exception, that is not handled. I will rewrite the errorhanding of the Receiver function and currently the transmitter is using the same port (5568) as the receiver.

localleon commented 6 years ago

Does the Standard allow to change the Port of the Transmitter so sending and transmitting at the same time would be possible ?