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

Get{Preview,Program}Scene sends malformed response during OBS startup #346

Closed
from-the-river-to-the-sea opened this issue Jun 17, 2019 · 0 comments · Fixed by #367
Closed
Milestone

Comments

@from-the-river-to-the-sea
Issue type

A change in behavior that may or may not be a bug

Description

Sometime between 4.4.0 and 4.6.1, obs-websocket started sometimes responding to GetPreviewScene and GetProgramScene with the following data:

{
    "message-id": "8",
    "name": "", 
    "status": "ok"
}

Of note here is that the name is the empty string, and sources is totally omitted.

As far as I can tell, this happens during a brief window of time during OBS' startup sequence. After that, it seems to always have a more properly-formed response.

If this is an intentional change in behavior, I can simply change my code to ignore these empty responses. But, I'm suspecting this change in behavior was unintentional, given that it violates the protocol by omitting the sources array entirely.

Steps to reproduce and other useful info

For me, this bug happens because I have code which is constantly trying to reconnect to OBS after a disconnect event occurs, such as when OBS is deliberately shut down. This means that as soon as OBS boots back up, my code reconnects and instantly starts querying the state of OBS, by sending commands such as GetPreviewScene and GetProgramScene. These commands used to always work as expected, but now there's this brief window of time right after startup where they send this empty response that they didn't used to send.

Technical information
  • Operating System : Win 10 x64
  • OBS Studio version : 23.2.1
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

Successfully merging a pull request may close this issue.

2 participants