• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

Question - Code Networking functions causing "non-zero status" crashes in 2.2.4.474

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:
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()
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?
 
Last edited:
Here are some example files showing just the particular networking problem:

https://www.dropbox.com/s/66t42ykn4t0pggk/networkbug.zip?dl=0
https://www.dropbox.com/s/qze9jfe2pm87s3z/networkbugfixed.zip?dl=0

networkbug has two objects, oIPGetter which will run the code in the OP and if successful, create oDrawIP, which will draw the IP address that was found. Stepping through the code in debug mode, you can see that everything seems to work fine and every variable is properly set, but at the end of the network async event the game will mysteriously crash with no error message and the following in the output box:
Code:
X://windows/Runner.exe exited with non-zero status (-1073741819)
elapsed time 00:00:18.9342578s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.4.374/bin/Igor.exe" -j=8 -options="C:\Users\matth\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Windows Run started at 11/05/2019 03:42:20
"cmd"  /c subst Z: /d

elapsed time 00:00:00.0530041s for command "cmd" /c subst Z: /d started at 11/05/2019 03:42:39
"cmd"  /c subst Y: /d

elapsed time 00:00:00.0590038s for command "cmd" /c subst Y: /d started at 11/05/2019 03:42:39
"cmd"  /c subst X: /d

elapsed time 00:00:00.0513398s for command "cmd" /c subst X: /d started at 11/05/2019 03:42:39
FAILED: Run Program Complete
With everything deleted except the troublesome code, the error happens every time, not just occasionally.

networkbugfixed shows the same code, but broken up with alarms between all the networking function calls, and it works fine. This is just the easiest to isolate and demonstrate issue, lots of stuff related to networking is now broken for me.
 

rIKmAN

Member
Here are some example files showing just the particular networking problem:

https://www.dropbox.com/s/66t42ykn4t0pggk/networkbug.zip?dl=0
https://www.dropbox.com/s/qze9jfe2pm87s3z/networkbugfixed.zip?dl=0

networkbug has two objects, oIPGetter which will run the code in the OP and if successful, create oDrawIP, which will draw the IP address that was found. Stepping through the code in debug mode, you can see that everything seems to work fine and every variable is properly set, but at the end of the network async event the game will mysteriously crash with no error message and the following in the output box:
Code:
X://windows/Runner.exe exited with non-zero status (-1073741819)
elapsed time 00:00:18.9342578s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.4.374/bin/Igor.exe" -j=8 -options="C:\Users\matth\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Windows Run started at 11/05/2019 03:42:20
"cmd"  /c subst Z: /d

elapsed time 00:00:00.0530041s for command "cmd" /c subst Z: /d started at 11/05/2019 03:42:39
"cmd"  /c subst Y: /d

elapsed time 00:00:00.0590038s for command "cmd" /c subst Y: /d started at 11/05/2019 03:42:39
"cmd"  /c subst X: /d

elapsed time 00:00:00.0513398s for command "cmd" /c subst X: /d started at 11/05/2019 03:42:39
FAILED: Run Program Complete
With everything deleted except the troublesome code, the error happens every time, not just occasionally.

networkbugfixed shows the same code, but broken up with alarms between all the networking function calls, and it works fine. This is just the easiest to isolate and demonstrate issue, lots of stuff related to networking is now broken for me.
Report it as a bug and attach the example projects to the bug report so YYG can take a look.

Use Help > Report a Bug in the IDE and follow the steps.
 

Duckbob

Member
I have the same problem.

There's no logical problem at all, so it worked perfectly before the 2.2.4 update. It works normally on the PC and some Android phones after the 2.2.4 update.
However, a shutdown is inevitable on the home screen if a large buffer is received after a successful connection is made in some models.

Multiple debug results, Async-Networking events seem to force the app to shut down even before buffers arrive.
 
I reported this as a bug a month ago and there's still no issue listed in the Mantis tracker. Is this going to get looked at? Should I submit it again?
 

rIKmAN

Member
I reported this as a bug a month ago and there's still no issue listed in the Mantis tracker. Is this going to get looked at? Should I submit it again?
Did you get the autoreply email that it had been received and with a ticket number?

If so, go to https://help.yoyogames.com/hc/en-us and login, then click your name in the top right, choose My Activities, find the ticket in the list and you can add more info / an update message to your existing ticket and if it has been closed it will re-open it.

This isn't a guarantee however - I have a 3mth old ticket I've posted about 8 updates to and still haven't got a single reply from any staff - but I'd try this a couple of times before submitting the same report again.
 
I got the reply and the ticket is still showing as open. I added an update, fingers crossed something is done - I can't work on my current project until this is resolved.
 
Top