Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mumble Client NullReferenceException in MumbleClient.AddDecodingBuffer() #49

Open
spockTheGrizzly opened this issue Apr 9, 2022 · 8 comments

Comments

@spockTheGrizzly
Copy link

Hi,

Thanks so much for making this client! I have brought the latest code from this repo into a brand new Unity project (using version 2021.2.13f1) and have the following error when connecting to a local murmur server on same machine:

unity_mumble_client_error

The config of my MumbleTester and MumbleMic scripts are as follows:

unity_mumble_tester_config

unity_mumble_mic_config

The client initially connects successfully to the server, but we're unable to send any audio (we use the official Mumble Desktop app to verify this).

The error above shows up almost immediately on startup and then not too long after we get disconnected from the server without the mumble client even noticing that we're disconnected. To be sure, I went back to an older Unity version where I'm confident this client worked back in 2021, but now it doesn't even work in that version.

What could be causing this?

Thanks so much for your help!

Cheers,
Danrae

@BananaHemic
Copy link
Owner

Hmm, any chance that you could try with a non-localhost murmur server?

@spockTheGrizzly
Copy link
Author

Hmm, any chance that you could try with a non-localhost murmur server?

Thanks for the quick response - yes, I tried with a non-localhost (remote) murmur server and saw the same thing. I've also tested that the servers (local & remote) can receive connections from the official mumble clients.

Also, in both cases (local vs. remote server), I see this error when I exit in Unity:

unity_mumble_udp_receiver_error

Cheers,
Danrae

@BananaHemic
Copy link
Owner

It looks like AllUsers ends up populated with a null entry. Could you add a check in MumbleClient.cs ln 252 for if newUserState is null? If so, maybe send a screenshot of a log so that we can see the stack trace

@spockTheGrizzly
Copy link
Author

I set a breakpoint in the debugger and could see that newUserState is never null (it actually contains the info for each user on the server as expected too) and line 252 in MumbleClient.cs executes as expected.

Something else interesting is, maybe less than a minute after the client gets disconnected from the server, I see this new warning about a UDP error + switching to TCP show up:

unity_mumble_client_log_with_new_warning

I enabled the debug logs in Unity console for you and I believe the stack trace is showing for all the errors in the previous comments. The stack trace in this image is for the new 'switching to TCP' warning I noticed.

@BananaHemic
Copy link
Owner

Oh wait, it might be that you don't have EventProcessor in the scene. Can you add that script to the same object as MumbleClient?

@spockTheGrizzly
Copy link
Author

Oh wait, it might be that you don't have EventProcessor in the scene. Can you add that script to the same object as MumbleClient?

OMG that was it haha! I'm able to connect and chat on the server now!

The latter error related that was happening when I exited the app was fixed when I rolled back to the following commit: 200cf22

Thanks so much for all your help! And for this repo - it's really an incredible contribution you've made to the open-source community. I added a 'star' in case that helps you somehow haha.

Best regards,
Danrae

@BananaHemic
Copy link
Owner

Thank you for the kind words! Means a lot to me.

I'm going to leave this open, there should be a better error log for when the event processor is not in. If you wanted to do a PR for that, would be helpful!

@BananaHemic BananaHemic reopened this Apr 10, 2022
@spockTheGrizzly
Copy link
Author

For sure! B.c. it's a work project, I need to get an approval, but I'll drop a patch here either way (maybe from my personal account, worst case). Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants