• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

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.
 

Roo

Member
Hi,

After some meticulous debugging I think i've run into this too, and it seems to simply be related to the number of network messages received by the Android app (maybe within a certain period of time), as it doesn't happen when receiving only one u8 buffer.

Does this MantisBT entry look like the one in question?
 
That tracker entry looks about right. I saw some partial improvements with 2.3 but it's still crashing older Android devices. To be honest I've kind of lost hope that it'll get fixed.
 
I don't know exactly what version the crashes started on, but I didn't have any crashes using the latest version available at the start of August 2019. I wasn't able to work on the project again until November 2019, which is when I started getting the crashes on a project that previously worked perfectly. The issue though, is that this crash only happens on mobile projects, and Play Store requirements changed between versions as well - if you make a game with a version of GMS that doesn't have the bug, you won't be able to publish it.
 

Roo

Member
I don't know exactly what version the crashes started on, but I didn't have any crashes using the latest version available at the start of August 2019. I wasn't able to work on the project again until November 2019, which is when I started getting the crashes on a project that previously worked perfectly. The issue though, is that this crash only happens on mobile projects, and Play Store requirements changed between versions as well - if you make a game with a version of GMS that doesn't have the bug, you won't be able to publish it.
In that case, how are mobile developers dealing with this in the meantime...? I can't get even the most basic networking working; is this actually an isolated problem affecting only some people, or is there just nobody making networked mobile games with GMS?

Regardless, thanks for the info so far, I do appreciate it.
 
Given how hard it is to find information about networking beyond what's covered in the official tutorial, I don't think many people are using networking functions in general, let alone on mobile.
 
  • Like
Reactions: Roo
I've been trying to get this fixed for two years now, and now my third bug report has been closed without fixing the issue.

This time, along with the first time, the reports were closed because it took YYG too long to look at it, and the second time it was closed after being reported as fixed (it wasn't). This isn't a hard issue to replicate, it's easily observed on the official YYG LAN platformer project, and according to YYG comments on the second bug report, they've even replicated the issue and identified the problem, but never actually fixed it.

If any YYG staff are reading this, what can I do to get this actually looked at? Is my only option to spend thirty minutes submitting another bug report just to have it ignored then falsely checked as solved in six-nine months? I've ran into other networking bugs (like networking not working at all on Pixel 3a XLs) that I haven't reported because I don't believe they'll be fixed and I don't want to waste my time.
 
I have problems with network connection too. Once it is connected, there is no problem. But usually it crashes so many times while trying to connect. I tried both tcp and ws types but result is same. I tried to add try{}catch{} for everything but it still crashes without giving any error. I published my game on Android platforms and I needed to add a text like "You need to try to connect to server maybe 10 times because it may crash." I'm trying to find a solution for it for 3 months. Over 500 people downloaded my game and 157 people had at least 1 crash in the first connection try. Only debug information I have may be helpful:
GML:
ConnectWrap with g_network_async_connect setting handshake state to 1 0
Starting WebSocket handshake for socket(0) at t=35053632
ProcessGMSHandshake returning GMS_HANDSHAKE_PENDING 0
Socket(0): Waiting for websocket handshake (have 0, need 13)
ProcessGMSHandshake returning GMS_HANDSHAKE_PENDING 0
Socket(0): Waiting for websocket handshake (have 0, need 13)
ProcessGMSHandshake returning GMS_HANDSHAKE_PENDING 0
Socket(0): Waiting for websocket handshake (have 149, need 13)
Socket(0): WebSocket handshake completed.
Socket(0): Handshake step 1 completed (was after WS handshake).
ProcessGMSHandshake returning GMS_HANDSHAKE_PENDING 0
Socket(0): Waiting for handshake step 2 (have 0, need 12)
ProcessGMSHandshakeData2 returning true 0
Socket(0): Handshake completed.
 
Your best bet will be filing a bug report. Maybe if they get enough users saying "this is a problem that needs to be fixed", they'll actually fix it. I've submitted three very detailed bug reports that were all closed without being addressed after YYG took too long to look at it.
 
Your best bet will be filing a bug report. Maybe if they get enough users saying "this is a problem that needs to be fixed", they'll actually fix it.
While true, I think most who have a slight interest in making a solid multiplayer game have made their peace with it, and simply moved on from GMS. Maybe the future is brighter with Opera as far as this stuff goes (who knows?), but it will take a lot of awesomely good PR to fix the damage done and bring back the networking userbase
 

Nyro17

Member
@BUMP

Im having that issue too!
App closes with Zero Status Report.

More far to it only certain devices can run my android game, or certain emulator version.

Still no fix?☹☹☹

Edit 1:

All my friends use Android device, with system updated, many of them can play others not, when they try to login/register, game closes
 
If you have a project/device combination that it reliably happens on, the only thing is to file a bug report. Since being bought by Opera they've gotten much better about responding to reports than they were when I first started this thread almost three years ago.
 

Nyro17

Member
If you have a project/device combination that it reliably happens on, the only thing is to file a bug report. Since being bought by Opera they've gotten much better about responding to reports than they were when I first started this thread almost three years ago.
I could fix this issue about exit zero status.

In my case it was related with Texture Page Size, for example, if our spritesheet is bigger than the selected option, it could give this error.
For me, downgrading the texture page size fixed my issue in emulators and game runs in old phones.
Ofc it run slow on slow phones due to technology evolution and android version changes.
 
Top