samp-discord-connector
samp-discord-connector copied to clipboard
DCC_SetBotActivity server crash
server_log.txt crashdetect output:
[01/04/2020 15:26:40] [join] BulgarianGamer has joined the server (137:x.x.x.x) [01/04/2020 15:26:40] [debug] Server crashed while executing main.amx [01/04/2020 15:26:40] [debug] AMX backtrace: [01/04/2020 15:26:40] [debug] #0 native DCC_SetBotActivity () in discord-connector.so [01/04/2020 15:26:40] [debug] #1 00129d94 in @yH_OnPlayerConnect@057 (playerid=137) at files/scripts/misc/discord.pwn:634 [01/04/2020 15:26:40] [debug] #2 00015380 in public OnPlayerConnect (137) at E:\mns\pawno\include\YSI_Data..\YSI_Coding..\YSI_Internal\y_cgen.inc:34
log-core for discord-connector plugin:
[04/01/20 15:26:40] [ERROR] Discord terminated websocket connection; reason: (0)
discord.pwn:634:
new szString[64];
format(szString, sizeof(szString), "MCNR (%i players, %s)", Iter_Count(Player), GetCurrentCityName(.short = true));
DCC_SetBotActivity(szString); // Line 634
Code is under OnPlayerConnect and OnPlayerDisconnect. Last item before crash in server_log.txt is a player join.
I made some network related changes; could you please try this development build out and report back if the crashes stopped?
I haven't used the dev build yet, but the crashes seem to have stopped since I moved SetBotActivity from OnPlayer(Dis)Connect to a timer every 5 seconds.
I made some network related changes; could you please try this development build out and report back if the crashes stopped?
I have the same problem, that build crashes the server when DCC_SetBotActivity () is called in OnGameModeInit
I made some network related changes; could you please try this development build out and report back if the crashes stopped?
I have the same problem, that build crashes the server when DCC_SetBotActivity () is called in OnGameModeInit
i had the same problem too... (https://github.com/maddinat0r/samp-discord-connector/issues/96)
This seems to happen when the native is called and the bot is reconnecting. I have been testing this and seen it happening randomly, I have used one minute to six minute timer and it isn't limited to OnGameModeInit (never had issues using it under OnGameModeInit).
I made some network related changes; could you please try this development build out and report back if the crashes stopped?
thanks for the advance but
in fact, that Dev build is crashing my server everytime OnGameModeInit
get called...
SA-MP Server: 0.3.7-R3
Exception At Address: 0x612E6174 Module: (Unknown)
Registers:
EAX: 0x00000000 EBX: 0x003A7E60 ECX: 0x0013EF8C EDX: 0x00000000
ESI: 0x0E5BFBA8 EDI: 0x0E5BFBA8 EBP: 0x65622D31 ESP: 0x00515C18
EFLAGS: 0x00210202
Stack:
+0000: 0x0000786D 0x00000000 0x00000000 0x00000000
+0010: 0x00000000 0x00000000 0x00000000 0x00000000
+0020: 0x00000000 0x00000000 0x00000000 0x00000000
+0030: 0x00000000 0x00000000 0x00000000 0x00000000
+0040: 0x00000000 0x00000000 0x00000000 0x00000000
+0050: 0x00000000 0x00000000 0x00000000 0x00000000
+0060: 0x00000000 0x00000000 0x00000000 0x00000000
+0070: 0x00000000 0x00000000 0x00000000 0x00000000
+0080: 0x00000000 0x00000000 0x00000000 0x00000000
+0090: 0x00000000 0x00000000 0x00000000 0x00000000
+00A0: 0x00000000 0x00000000 0x00000000 0x00000000
+00B0: 0x00000000 0x00000000 0x00000000 0x00000000
+00C0: 0x00000000 0x00000000 0x00000000 0x00000000
+00D0: 0x00000000 0x00000000 0x00000000 0x00000000
+00E0: 0x00000000 0x0063945D 0x00000000 0x0032DA20
+00F0: 0x00000000 0x00000000 0x00000000 0x00000000
+0100: 0x00000000 0x00000000 0x00000000 0x00000000
+0110: 0x00000000 0x00000000 0x00000000 0x00000105
+0120: 0x00000000 0x00000000 0x00000000 0x00000000
+0130: 0x00000000 0x00000000 0x00000000 0x00000000
and that false Websocket failure message
[13/05/2020 | 18:31:36] Loading plugin: discord-connector
[13/05/2020 | 18:31:57] >> plugin.dc-connector: timeout while initializing data.
[13/05/2020 | 18:31:57] plugin will proceed to retry connecting in the background.
but when i try to load my server using an stable release like v0.3.2 it load normally without any problems....
@Zorono You do understand that nothing has been changed since that commit was made?
@Zorono You do understand that nothing has been changed since that commit was made?
yes ??
i am just reporting my situation...
Please confirm if this is fixed.
This is fixed and should be closed.
I'm not quite sure that this is fully fixed. I did some changes on the WebSocket netcode, but I suspect that there's still a possibility for a crash, especially on an instable connection.