OBS cannot start when a iOS device is connected to mac
wookayin opened this issue · comments
When there is a iOS camera source added to the scene and a iOS device is connected to mac via a lightning-USB cable, OBS cannot start. The UI window does not show up.
The device that is connected to mac could be a different iOS device referred by the iOS camera source, or the same device but not OBS camera app running.
Logs from stdout:
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: coreaudio: device '...' initialized
info: [Loaded global audio device]: 'Mic/Aux'
info: [obs-ios-camera-plugin] Creating instance of plugin!
usbmuxd_listen: pollling
usbmuxd_listen_poll:
usbmuxd_listen: done polling
info: [obs-ios-camera-plugin] Loaded Settings: Connecting to device
info: [obs-ios-camera-plugin] Connecting to device
usbmuxd_connect: Reading connect result...
info: [obs-ios-camera-plugin] Updated device list
info: [obs-ios-camera-plugin] Connecting to device
usbmuxd_connect: Reading connect result...
usbmuxd_connect: Connect failed, Error code=3
usbmuxd_connect: Reading connect result...
usbmuxd_connect: Connect failed, Error code=3
...
and thousands of lines about reconnection will flood.
Now we plug off the cable. Then with the following log
info: [obs-ios-camera-plugin] Updated device list
warning: iPad: Device with unique ID '(some UUID)' disconnected
the application window starts.
It happens on OBS 26.0.2, 26.1 with all type of iOS devices.
Relevant code lines:
https://github.com/wtsnz/obs-ios-camera-source/blob/9238d58/deps/portal/src/Device.cpp#L82
I have no idea what value is assigned to connectTimeoutMs
, but this seems to be not working. The log message (connect failed) happens only once inside usbmuxd_connect(...)
.
Hey @wookayin
Thanks for the issue. I noticed this issue yesterday while in the project. I've got an idea why this is happening, and a fix in the works.
Are you using Windows? I ask because in my testing, this issue appears to only effect the Windows version of the plugin. (Just read the title, will investigate - the fix I have in mind will fix this however)
Hi, do you have any updates on this?
Thank you Will. I was just impatient for the fix, so I tried building #60 and it seems working fine. At least the UI does not freeze!
One feedback: However, on the console (stdout) log the following log lines are still flooding while iOS camera app is not running.
usbmuxd_connect: Reading connect result...
usbmuxd_connect: Connect failed, Error code=3
usbmuxd_connect: Reading connect result...
usbmuxd_connect: Connect failed, Error code=3
UPDATE: NVM, had some glitches. After a clean build these log messages are gone.