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

Error reading buffer from masterserver (only using punch) #80

Open
MrGentle opened this issue Apr 6, 2019 · 1 comment
Open

Error reading buffer from masterserver (only using punch) #80

MrGentle opened this issue Apr 6, 2019 · 1 comment

Comments

@MrGentle
Copy link

MrGentle commented Apr 6, 2019

I'm trying to set up a project running with gmnet punch only.
my master server is running version 1.2.5
my punch version is 1.2.4 (should be latest)

server

-- UDPHP : SERVER - Starting...
-- UDPHP : SERVER - Started!
-- UDPHP : SERVER - Reconnecting to master Server - Sent UDP Packet
-- UDPHP : SERVER - Reconnecting to master Server - Reconnected via TCP
-- UDPHP : SERVER - Reconnecting to master Server - Sent TCP Packet
-- UDPHP : SERVER - Reconnected to master Server.
-- UDPHP : MAIN - Requested server list.
-- UDPHP : MAIN - Downloader: Got message from master server
Buffer size (1):141
-- UDPHP : MAIN - [{"ip":"my ip is herere but censored","data1":"0.1","data2":"","data3":"","data4":"","data5":"","data6":"","data7":"","data8":"","createdTime":1554582647}]

-- UDPHP : MAIN - Downloader: Got lobby data.
-- UDPHP : CLIENT 100006 - Starting...
-- UDPHP : CLIENT 100006 - Setting up hole punch.
-- UDPHP : CLIENT 100006 - Requesting connection Data - Sent UDP Packet
-- UDPHP : CLIENT 100006 - Requesting connection Data - Connected via TCP
-- UDPHP : CLIENT 100006 - Requesting connection Data - Sent TCP Packet
-- UDPHP : CLIENT 100006 - Started
-- UDPHP : CLIENT 100006 - Got message from master server

FATAL ERROR in
action number 1
of Async Event: Networking
for object obj_client:


Attempting to read from outside the buffer, returning 0
 at gml_Script_udphp_clientNetworking (line 40) -     var com = buffer_read(in_buff, buffer_s8 );
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_udphp_clientNetworking (line 40)
called from - gml_Object_obj_client_Other_68 (line 3) - 	udphp_clientNetworking(client_id);

Any idea what is going on?

@The-any-Key
Copy link
Collaborator

As the master server use TCP there is a bug in GM that sometimes cut of the TCP stream. You can try check the size of the incoming stream. And if it just 1 or 2 byte you can ignore it and let the user try again.

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

2 participants