Cruze03 / discord-utilities

Utilities that can be used to integrate gameserver to discord server.
GNU General Public License v3.0
42 stars 15 forks source link

Memory leak detection #20

Open gaejuck opened 3 years ago

gaejuck commented 3 years ago

I think memory was leaked due to this error. Is there any way to fix it?

L 06/13/2021 - 14:39:32: [discord_api.smx] [DISCORD] Couldn't Send Webhook - Fail 0 400 L 06/13/2021 - 14:40:25: [discord_api.smx] [DISCORD] Couldn't Send Webhook - Fail 0 400

L 06/13/2021 - 14:47:04: [SM] MEMORY LEAK DETECTED IN PLUGIN (file "discord_api.smx") L 06/13/2021 - 14:47:04: [SM] Unloading plugin to free 29259 handles. L 06/13/2021 - 14:47:04: [SM] Contact the author(s) of this plugin to correct this error. L 06/13/2021 - 14:47:04: -------------------------------------------------------------------------- L 06/13/2021 - 14:47:04: Type DataPack | Count 334 L 06/13/2021 - 14:47:04: Type PrivateFwd | Count 1 L 06/13/2021 - 14:47:04: Type Trie | Count 3 L 06/13/2021 - 14:47:04: Type HTTPHandle | Count 169 L 06/13/2021 - 14:47:04: Type JanssonObject | Count 28752 L 06/13/2021 - 14:47:04: -------------------------------------------------------------------------- L 06/13/2021 - 14:47:04: Oldest Living Handle: Trie created at 06/13/2021 - 14:01:12 L 06/13/2021 - 14:47:04: Newest Living Handle: JanssonObject created at 06/13/2021 - 14:47:04 L 06/13/2021 - 14:47:04: -- Approximately 27941 bytes of memory are in use by (29259) Handles.

L 06/13/2021 - 14:47:04: [SM] Exception reported: Memory leak L 06/13/2021 - 14:47:04: [SM] Blaming: discord_api.smx L 06/13/2021 - 14:47:04: [SM] Call stack trace: L 06/13/2021 - 14:47:04: [SM] [0] DataPack.DataPack L 06/13/2021 - 14:47:04: [SM] [1] Line 292, C:\Users\STARS\Desktop\Coding\Discord Utilities\scripting\discord_api.sp::UrlToDP L 06/13/2021 - 14:47:04: [SM] [2] Line 70, discord/SendWebHook.sp::SendWebHook L 06/13/2021 - 14:47:04: [SM] [3] Line 93, discord/SendWebHook.sp::SendWebHookReceiveData

crashzk commented 3 years ago

Leak would be in the Discord API, not the Discord Utilities

gaejuck commented 3 years ago

yeah I know, but I wrote here because I am using sourcemod-discord that he have worked on and I cannot put an issue on his sourcemod-discord repository.

gaejuck commented 3 years ago

L 06/23/2021 - 22:32:27: [SM] Exception reported: Invalid handle b1800d6 (error 3) L 06/23/2021 - 22:32:27: [SM] Blaming: discord_api.smx L 06/23/2021 - 22:32:27: [SM] Call stack trace: L 06/23/2021 - 22:32:27: [SM] [0] json_object_get L 06/23/2021 - 22:32:27: [SM] [1] Line 18, C:\Users\STARS\Desktop\Coding\Discord Utilities\scripting\include\discord/stocks.inc::JsonObjectGetString L 06/23/2021 - 22:32:27: [SM] [2] Line 112, C:\Users\STARS\Desktop\Coding\Discord Utilities\scripting\discord_api.sp::BuildAuthHeader L 06/23/2021 - 22:32:27: [SM] [3] Line 135, C:\Users\STARS\Desktop\Coding\Discord Utilities\scripting\discord_api.sp::PrepareRequest L 06/23/2021 - 22:32:27: [SM] [4] Line 21, discord/GetGuilds.sp::ThisSendRequest L 06/23/2021 - 22:32:27: [SM] [5] Line 46, discord/GetGuilds.sp::GetGuildsData L 06/23/2021 - 22:33:20: [discord_api.smx] [DISCORD] Couldn't Send Webhook - Fail 0 0 L 06/23/2021 - 22:33:29: [discord_api.smx] [DISCORD] Couldn't Send Webhook - Fail 0 0

ghost commented 3 years ago

this is also happening to me