citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.42k stars 2.01k forks source link

setting endpoint_add_udp twice with the same value is crashing FXServer #1514

Open manzarek123 opened 2 years ago

manzarek123 commented 2 years ago

Of course you should not do that but maybe a few additional checks could prevent some users to accidentally crash their server

Repro:

In server.cfg

endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

Then when the server is running type: endpoint_add_udp "0.0.0.0:30120"

Result: cfx> endpoint_add_udp "0.0.0.0:30120" [ citizen-server-impl] Error: Could not bind on 0.0.0.0:30120 - is this address valid and not already in use? [ citizen-server-impl] [ server] Error: Loop svMain seems hung! (last checkin 45 seconds ago) [ server] Warning: svMain watchdog stack: root [ server] Uploaded a live hang dump to the CitizenFX crash reporting service. The report ID is b89de889-fd37-43e8-b52f-ca114c2b8b27.

blattersturm commented 2 years ago

That's.. odd. The error itself should close, not 'hang'.

Is there a Windows dialog box you're forgetting to dismiss?

manzarek123 commented 2 years ago

Is there a Windows dialog box you're forgetting to dismiss?

Ooops yes my bad there is one in the background and it is closing the process indeed. So there is no crash in the end... Feel free to close this issue or leave it open if closing the server is not a desired behavior.

gottfriedleibniz commented 5 months ago

Given how many "is this address valid and not already in use" posts there are on the forum and discords, an issue like this should maybe placed in a FAQ somewhere(?).