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

not compilable and executable #27

Closed
theaddonn opened this issue Dec 23, 2023 · 2 comments
Closed

not compilable and executable #27

theaddonn opened this issue Dec 23, 2023 · 2 comments
Labels
wontfix This will not be worked on

Comments

@theaddonn
Copy link

When trying to execute a executable generated with this example code it fails:

package main

import (
	"github.com/sandertv/go-raknet"
)

func main() {
	listener, _ := raknet.Listen("0.0.0.0:19132")
	listener.PongData([]byte("MCPE;Dedicated Server;120;1.20.50;1000;9999;13253860896781930865;Bedrock level;Survival;1;19132;19133;"))

	defer listener.Close()
	for {
		conn, _ := listener.Accept()

		b := make([]byte, 1024*1024*4)

		_, _ = conn.Read(b)
	}
}

The following error:

C:\Users\current_user\Test>Test.exe
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x9c62a9]

goroutine 1 [running]:
github.com/sandertv/go-raknet.(*Listener).PongData(0x0?, {0xc0000c6000?, 0x0?, 0x9ff13d?})
        C:/Users/current_user/go/pkg/mod/github.com/sandertv/[email protected]/listener.go:139 +0x29
main.main()
        C:/Users/current_user/Test/main.go:9 +0x88
@Sandertv
Copy link
Owner

Please make sure to check all errors and report back.

@theaddonn
Copy link
Author

sorry my bad, ran another server on the same port

@Sandertv Sandertv added the wontfix This will not be worked on label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants