Exception thrown when using socket sets

~~~ SocketSett xFDset; xFDset = FreeRTOSCreateSocketSet(4); FreeRTOSFDSET(xUDPSocket, xFDset, eSELECTREAD); FreeRTOSselect(&xFDset, pdMSTOTICKS(500)); ~~~ I’ve set up a socket set with the code above and when I reach the select function an exception is thrown( read access violation, line 532 of event_groups.c). I’m running this on the win32 simulator using Visual Studio. I don’t understand what is happening in the code where the exception is thrown. Is there anything about this set up that would cause the exception?

Exception thrown when using socket sets

Comparing to the example code on https://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusUDP/API/select.shtml I notice two strange things in your code:
FreeRTOSFDSET(xUDPSocket, xFDset, eSELECTREAD);
FreeRTOSFDSet() only has two parameters but you are passing three. See https://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusUDP/API/FD_SET.shtml
FreeRTOSselect(&xFDset, pdMSTOTICKS(500));
The first parameter to FreeRTOSselect() passing is the xFDSet variable directly, whereas you are passing in the address of the variable – that is most likely the cause of the exception. I would recommend ensuring the code, as far as possible, builds without any compiler warnings.