This message was deleted.
# helpdesk
s
This message was deleted.
p
cc @boundless-energy-78552
b
Hey Vicente, do you know what is the content of the array? ( At the end of the message )
s
I reproduced the error and made screenshots of the array content: Hope it helps! Thank you very much.
@boundless-energy-78552 Any ideas about what might be happening? or at least a workaround to avoid the crash? please the success of a big project depends on it
b
Hey Vicente, I’m going to take a look, do I have do to something to reproduce the issue? Also what is your Unity version?
s
2021.3.13f1
I don't know how to reproduce the issue, it ramdomly happens to some connected users, and sometimes don't
b
Do you use Participant.IsSpeakingChanged?
s
also, it never happens when we test it deploying in localhost, only when we use the server
no, we don't even subscribe to it
👍 1
b
Can you try to reproduce the issue with the
LK_DEBUG
define added to the build system? It enables internal logs
s
ok! I'll try it and I'll paste the log, thank you so much!
🙏 1
@boundless-energy-78552 I added LK_DEBUG to the script compilation symbols, but I am not sure if the info provided changed
b
I can’t figure out the order of the messages with the screenshots? Can you mb send a log file?
s
I have just realized that there are a couple "StopAllCoroutines" at our code. Can these also affect the coroutines of livekit and mess it up?? EDIT: Nevermind, I removed them and the error still happens
maybe the unity build is outdated and conflicts with the last server releases? our server build is from last friday while the last unity sdk is from september (maybe I am saying silly things, just trying to figure out a reason 😅)
b
Hey, I’m going to update the JS SDK version today, I’ll investigate the above issue
s
@boundless-energy-78552 Thank you! Meanwhile I keep trying things
I guess the unity SDK is based on the JS one? will it be updated as well?
👍 1
🙌 1
b
Hey, I just updated the Unity SDK to JS SDK v1.6.3
Can you give it a try?
s
Nice! I am on it
Same error, it looks that eventually the IsSpeakingChanged C# callback is unreachable 😢
b
So weird, so you’re not using IsSpeakingChanged and ActiveSpeakersChanged? It’s weird that nothing happen on unity.livekit.io
So there is no particular steps to reproduce the issue?
s
no, we just need to keep speaking for a while, and eventually one of the IsSpeakingChanged fails
👍 1
we don't do anything on those events
p
just guessing things: might it be GC related? if you register a dummy event handler for the speaker updates and thus keep it alive, does that help?
s
In the last tries I suscribed to the ActiveSpeakersChanged event
but left it empty
@boundless-energy-78552 We see that right before the error, there are always those "SetKeepAlive" to false which seem to be causing the next callbacks to not be found? We can't figure out what may cause that some resources are realeased/killed. The weird thing is that after the error the next calls to the speakers are fine again and everything keeps working (just slower due to some broken JS behavior or something like that? No idea). Sorry to annoy you again, we are getting crazy here 😆
@polite-kilobyte-67570 I totally disabled the garbage collector to check if it might be related, and the error still happens 😟
p
the GC was just a random guess, sorry to hear that it doesn’t seem to fix things.
b
Can you enable Full StackTrace ( even for info logs ) ? So we can know where the SetKeepAlive(false) come from
I can’t reproduce that on my side, it’s why I’m asking you to do it 🙂
Also it’s weird, I always thought it was a GC issue, maybe the references are still broken even if the GC is disabled
s
Good news! It looks like the error is solved! This is what we did: We have several Player instances in the game. Even though a new player is created every time a participant joins the room, they are not related in any other way. So we had independent participants and players. Even though it did not seem a GC issue because I disabled it, I have tried to keep a reference to the Participant in every Player we create, so it wouldn't be disposed while the player exists. I tested it for 10 minutes and the error did not happen again! (the error used to happen in less than 1 minute). I can't thank you enough for all your help and time dedicated to this! I would have never guessed the cause without your help!
1
🙏 1
b
Ohhhh gotcha, we’re already keeping a reference of the Participant, so something is wrong on our side, I’ll verify that the references are valid and publish a fix if this is that. Thanks for investigating 🙂
🙌 1
When you reproduce the issue, does a participant disconnect in the meantime?
s
Nope, they kept connected, their cam worked and they could speak normally. The game became very slow though
🙏 1
if you mean if anybody else left the room, no, the participants never changed before or after the issue
b
Is it possible that you reproduce the issue with full StackTrace, also for the Info logs? ( In the build settings ) So I can see where the SetKeepAlive(false) come from
👍 1
s
If we enable the full stack trace, there happens an error right after entering the room and it fails
it is related to a null track, despite we added a try-catch arround the tracks adding
@boundless-energy-78552 We can't find a donations link. Is there a way to get you an small tip to thank your support? For some well deserved beers 😉
b
Hey, thank you very much for offering but we don’t need it 💙