bitfocus / companion-module-obs-studio

OBS Studio Module for Companion
MIT License
44 stars 28 forks source link

Companion crashes/timeouts when starting websocket connection #247

Closed ma-blip closed 7 months ago

ma-blip commented 10 months ago

Describe the bug Companion crash/timeouts when starting up the websocket connection. Guessing due to massive amount of layers in the scenes. Each scene(4 in total) contains around 100+ layers

23.12.01 16:26:19 Instance/ModuleHost: Connection "obs" started 23.12.01 16:26:19 Instance/ModuleHost: Registered module client "Sin5eVLeCYlNZahM1fJpW" 23.12.01 16:26:19 Instance/Wrapper/obs: Connected to OBS 23.12.01 16:26:26 Instance/ModuleHost: Instance "obs" failed to init: Error: Call timed out Error: Call timed out at t.IpcWrapper.sendWithCb (C:\Program Files\Companion\resources\main.js:2:2165956) at Object.init (C:\Program Files\Companion\resources\main.js:2:7902222) at l. (C:\Program Files\Companion\resources\main.js:2:7911209) at l.emit (node:events:514:28) at l.emit (node:domain:489:12) at ChildProcess. (C:\Program Files\Companion\resources\main.js:2:2153461) at ChildProcess.emit (node:events:514:28) at ChildProcess.emit (node:domain:489:12) at emit (node:internal/child_process:937:14) at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Version Information:

Nevadadave commented 7 months ago

I have been fighting this problem for about a week, the only work around was to move my scenes into different collections. I know I have an edge case; I have a big show (200 scenes / 384 companion buttons) This show has been running flawlessly for a year. Recently I added a few scenes that broke the camel's back (unbeknownst to me). What I think is happening is the long running request for scene data is timing out. then the requests keep piling up until all the CPU resources are exhausted, ending in a blue screen of death (Windows 11). It would be great if time and resources be added to handle large scene collections. Additionally handle timed out calls/threads/RPCs before retrying and consuming additional resources.

bryce-seifert commented 7 months ago

Thank you both for the input. I'm going to devote some time this week to working on optimization, specifically targeting large projects. I've already started some of this work, and will let you know when I have something to test, hopefully within a week or so.

bryce-seifert commented 7 months ago

@ma-blip @Nevadadave If you want to download and try the latest Companion beta build, I hope to have addressed this issue. Let me know if it persists or any other issues pop up

bryce-seifert commented 7 months ago

I've heard positive reports from multiple users that the latest update helps with this. If you are experiencing the issue on the beta still, please report back and let me know, but for now I'm closing.