RhyminGarFunkle
Member
My game is networked between mobile devices and a PC host, and several network functions that previously functioned perfectly now cause frequent "non-zero status" crashes. These crashes are somewhat intermittent (but still present) on most devices except when on Nexus 7, in which case they're easily replicated. Was there a change in the way networking functions work in the newest versions? I don't know exactly which version the crashes started on, I wasn't able to work on this project between August and last week (I believe there were three updates in that time) and have only now noticed the issues.
I've also tested this on the official YoYo Games LAN platforming tutorial, with no modifications, and got a non-zero status crash on the Nexus 7, where previously it worked perfectly - a few seconds after joining the server, it crashes to the home screen with no freezing or error messages.
One example is a simple loop ran on game start that determines the IP address of the device that the game is running on (used so it can be run on both IPv4 and IPv6). Here's the previous code that worked under previous versions and now causes crashes:
This caused crashes every time on Nexus 7, roughly 1 in 3 times on other Android devices, and roughly 1 in 5 times on PC. I was able to fix this by breaking every network_create_server into separate alarms, triggered one after another, and having the networks be destroyed in another alarm event whose timer is set in the networking_async event, but again, this code previously worked perfectly every time on every platform, so the fact that it doesn't anymore sets off alarm bells.
I'm still getting frequent networking errors on the Nexus 7 that seem to happen any time , and occasional errors on my other Android devices that I test on. As near as I can tell, they're caused by having a network async event occur during the same step as other networking functions are used - in the example above, it was having network_destroy() happen in the async event, but I'm also getting crashes when (I think) a device connects to a network and receives data back from the server in the same step.
Does anyone know what happened, perhaps what I'm doing wrong and if there are any workarounds, or should I file a bug report?
I've also tested this on the official YoYo Games LAN platforming tutorial, with no modifications, and got a non-zero status crash on the Nexus 7, where previously it worked perfectly - a few seconds after joining the server, it crashes to the home screen with no freezing or error messages.
One example is a simple loop ran on game start that determines the IP address of the device that the game is running on (used so it can be run on both IPv4 and IPv6). Here's the previous code that worked under previous versions and now causes crashes:
Code:
//create
connectip = "0"
broadcast_buffer = buffer_create(32,buffer_fixed,1)
serverid = network_create_server(network_socket_tcp,dport,10)
checkserver = network_create_server(network_socket_udp,dport,100)
alarm[0] = 1
//alarm0
buffer_seek(broadcast_buffer,buffer_seek_start,0)
buffer_write(broadcast_buffer,buffer_string,"Test Server")
network_send_broadcast(serverid,dport,broadcast_buffer,buffer_tell(broadcast_buffer))
alarm[0] = 2
//networking async
var ip;
ip = ds_map_find_value(async_load,"ip")
connectip = ip
network_destroy(serverid)
network_destroy(checkserver)
instance_destroy()
I'm still getting frequent networking errors on the Nexus 7 that seem to happen any time , and occasional errors on my other Android devices that I test on. As near as I can tell, they're caused by having a network async event occur during the same step as other networking functions are used - in the example above, it was having network_destroy() happen in the async event, but I'm also getting crashes when (I think) a device connects to a network and receives data back from the server in the same step.
Does anyone know what happened, perhaps what I'm doing wrong and if there are any workarounds, or should I file a bug report?
Last edited: