YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

[Windows] Illegal socket index in Windows 7 #7893

Open SunCatMC opened 1 month ago

SunCatMC commented 1 month ago

Description

When trying to connect to a game server my game encounters the following crash:

___________________________________________
############################################################################################
ERROR in action number 1
of Key Press Event for <Enter> Key for object obj_aphandler:
Illegal socket index
at gml_Script_scr_connect_to_ap
############################################################################################
gml_Script_scr_connect_to_ap (line -1)
gml_Object_obj_aphandler_KeyPress_13

Steps To Reproduce

Which version of GameMaker are you reporting this issue for?

IDE v2024.8.1.171 Runtime v2024.8.1.218

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

Which platform(s) are you seeing the problem on?

Windows

3cff1589-620b-4089-9c18-0b6250491c5d

YYDan commented 1 month ago

Note that the Windows platform section of our required SDKs FAQ has said for a long time that Websockets will have issues on Win 7:

Certain functionality in the game, like secure websockets support in networking or various elements of security when doing HTTP requests, will prevent the use of Win 7 and Vista (or might at best require your players to install the final Win 7 Service Pack) and we are unable to do anything about this. Similarly, using any third-party extensions may have the ability to restrict this also, so please speak to the asset/extension author if you have any issues with older versions of Windows and your game.

However, the manual does not appear to have anything saying this, so if nothing else that should be documented there also.

SunCatMC commented 1 month ago

this mentions specifically secure websockets, which is probably wss? if that is the case, i would expect the ws connection to not error out like that

If you update it to say that any websocket connection is unsupported, i would be fine with that

yoyo-danielc commented 1 month ago

I don't have a Windows 7 machine handy to test your project, but WebSocket isn't supported on Windows 7.

If network_create_socket() is called with network_socket_ws or network_socket_wss it will print an error to the console and return -1 (hence the invalid socket index error when you subsequently call network_connect_raw_async()).

SunCatMC commented 1 month ago

then please update your documentation to say that it's any websocket code unsupported, thank you

YYBartT commented 1 week ago

Added a note to the network_create_socket() and network_create_socket_ext() manual pages.