:IsVoiceEnabledForUserIdAsync() crashes Studio when used in the Command Bar

Reproduction Steps
Enter any Roblox game and (while not playtesting) execute the following code in the Command Bar: game:GetService("VoiceChatService"):IsVoiceEnabledForUserIdAsync(1)

Expected Behavior
For the function to either print out an error message (if something goes wrong) or return a Boolean value.

Actual Behavior
The studio freezes for a moment and crashes a few seconds later.
Sometimes, before the studio freezes, “StartProcessException…” appears in the output.
(It doesn’t matter if I put a random userId or if I put my userId, it still crashes the Studio)

error

Issue Area: Studio
Issue Type: Crashing
Impact: Low
Frequency: Very Rarely

4 Likes

Can confirm, using Windows 11.

image

My Studio version: 0.506.2.5060610

2 Likes

Wow. I can confirm that this happens as well and that it happens rarely :sweat_smile:.

Most likely a newbje question:

Why is the impact low? Wouldn’t it be considered higher?

2 Likes

OP marked it as low priority because this only happens in command bar, and not many developers use this function (yet), let alone in the command bar. So it’s not the highest priority.

3 Likes

I see. Thanks for the clarification.

That makes sense because the only time I used it (which was months ago) was for InsertService for Roblox’s Official Gears.

While Studio crashing here is certainly not ideal and should instead be replaced with an error, it is worth pointing out that the docs clearly state that:

This function is not yet implemented server-side.

The reason this happens is because IsVoiceEnabledForUserIdAsync is only implemented on the client and only works for the authenticated user. The only place that this method works is when called in a LocalScript with LocalPlayer.UserId as the parameter.

2 Likes

I just tested it out, and Studio crashes instantly for me. This seems to only occur when in Edit mode, and functions correctly in playtest mode (returns true/false on client, errors that it’s not implemented on server).

1 Like

Personally, It always happen to me

Luau VMs in the Edit Datamodel are weird…

Generally, it should combine the server and client datamodel together.

Obviously, there’s some issue with the LocalPlayer reference in the command bar which means it cant pull the User ID.

EDIT: yep
image

2 Likes

Hey everyone! We fixed this quite a while ago. So sorry for the late update.

3 Likes