Closed ghost closed 4 years ago
I have identified the cause of crash: players connecting and disconnecting. I suggest this to be labelled as high priority.
Make a PR and fix it yourself, takes 2 seconds. Stop complaining about an inactive project. Considering I use OgarII in production and have been for 6 months, it’s stable with a few minor changes. If you can’t fix it because you have no basic understanding of JavaScript, you shouldn’t be using an experimental software.
Your response was not helpful. Why not help fix the problem if it takes 2 seconds? Think before you speak. Your hostility and condescending behaviour isn't welcome. I will not fuel drama within this project.
Humble yourself.
If you can’t fix it because you have no basic understanding of JavaScript
Yeah, because fixing an ID issue within a project that you haven't developed on is really basic.
It may be simple for YOU, but you mentioned basic javascript. There is nothing basic about that lol, I wouldn't expect a near new programmer to fix that issue, possibly at all.
Should be fine now.
Thank you! I will try this.
Did some tests and the crash is still there.
Thanks @wunzer0, didn’t test it myself but it theoretically should’ve worked. Can you share the error message and stacktrace?
The error message looks similar but it's not identical. Here it is:
@ 2019-12-15 21:45:55.903 [FATAL] TypeError: Cannot read property 'id' of undefined at getLeaderboardData (/root/server/src/gamemodes/FFA.js:13:38) at leaderboard.map (/root/server/src/gamemodes/FFA.js:65:48) at Array.map (<anonymous>) at FFA.sendLeaderboard (/root/server/src/gamemodes/FFA.js:65:34) at Connection.update (/root/server/src/sockets/Connection.js:148:34) at Listener.update (/root/server/src/sockets/Listener.js:125:49) at ServerHandle.onTick (/root/server/src/ServerHandle.js:169:23) at Ticker._tick (/root/server/src/primitives/Ticker.js:43:30) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5)
Okay, seems like Gamemode.compileLeaderboard
isn’t always called before Gamemode.sendLeaderboard
. I have a hacky fix for this.
@wunzer0 Try this.
@wunzer0 Try this.
Done. Let's see how it goes.
Done. Let's see how it goes.
I'll assume it's working @wunzer0?
Done. Let's see how it goes.
I'll assume it's working @wunzer0?
Yes, I haven't got any more crashes. Thank you!
How did you solve this? Do not really understand
Error message:
@ 2019-12-04 19:18:46.811 [FATAL] TypeError: Cannot read property 'id' of undefined at getLeaderboardData (/root/server/src/gamemodes/FFA.js:13:38) at leaderboard.map (/root/server/src/gamemodes/FFA.js:64:48) at Array.map (<anonymous>) at FFA.sendLeaderboard (/root/server/src/gamemodes/FFA.js:64:34) at Connection.update (/root/server/src/sockets/Connection.js:148:34) at Listener.update (/root/server/src/sockets/Listener.js:125:49) at ServerHandle.onTick (/root/server/src/ServerHandle.js:169:23) at Ticker._tick (/root/server/src/primitives/Ticker.js:43:30) at ontimeout (timers.js:482:11)