ConcurrentModificationException errors

So today I finally released by bot to production, which was scary because it meant going from 3 servers to 16k servers... so of course I expected errors. This error is popping up on various places on my bot when accessing stuff from Discord. I'm using: defaultStrategy = EntitySupplyStrategy.cacheWithCachingRestFallback. This is happening in various functions that interact with Discord data in some way, in the particular stacktrace I attached, it refers to this call:
private suspend fun EventContext<MemberLeaveEvent>.onMemberLeft() {
val world = nabBot.serverWorldMapping[event.guild.longId]
val botMember = event.guild.selfMember() // <-- this line
webhookManager.sendLogMessage(event.guild) {
// More code
}
}
private suspend fun EventContext<MemberLeaveEvent>.onMemberLeft() {
val world = nabBot.serverWorldMapping[event.guild.longId]
val botMember = event.guild.selfMember() // <-- this line
webhookManager.sendLogMessage(event.guild) {
// More code
}
}
event { action { onMemberLeft() } }
event { action { onMemberLeft() } }
This is happening in many different places, with stuff that interacts with the entity supplier or with Flows.
Solution:
Message Not Public
Sign In & Join Server To View
Jump to solution
48 Replies
gdude
gdude•3mo ago
That looks like a problem with Kord, so I'll have to defer to @Kord Team Members While you wait, make sure you're using the latest KordEx snapshot and not providing your own Kord version
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
SchlaubiBus
SchlaubiBus•3mo ago
We should as I published 0.5.1 a few days ago
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
SchlaubiBus
SchlaubiBus•3mo ago
yeah I think this was largely resolved by changing it in kord, however cache doesn't change it for now
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
Galarzaa
Galarzaa•3mo ago
I will give this a try I'm actually in the 1.8.0 SNAPSHOT, tried 1.8.1, but I was getting these issues: https://canary.discord.com/channels/1121419906995458098/1252310860551028767
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
gdude
gdude•3mo ago
you got that while matching the kordex build environment? is 0.5.1 not part of 0.14.0-SNAPSHOT?
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
gdude
gdude•3mo ago
was there a new cycle that I missed?
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
gdude
gdude•3mo ago
Oh huh, was the new cycle announced? Maybe I forgot about it
Unknown User
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
gdude
gdude•3mo ago
That's not explicit enough imo haha But yeah, fair
Want results from more Discord servers?
Add your server