obs-zoom-and-follow
obs-zoom-and-follow copied to clipboard
NSWindow drag regions should only be invalidated on the Main Thread
Hi,
The script fails to zoom in with the following error:
objc.error: NSInternalInconsistencyException - NSWindow drag regions should only be invalidated on the Main Thread!
Full script log (using v2022.09.22) with source transform set to Stretch to bounds:
[zoom_and_follow_mouse.py] Source update
[zoom_and_follow_mouse.py] No sources, likely OBS startup.
[zoom_and_follow_mouse.py] Source Name: Firefox
[zoom_and_follow_mouse.py] Updating Source List
[zoom_and_follow_mouse.py] System: Darwin
[zoom_and_follow_mouse.py] browser frame | <Swig Object of type 'obs_source_t *' at 0x1292c3b10>
[zoom_and_follow_mouse.py] Firefox | <Swig Object of type 'obs_source_t *' at 0x1292c3a20>
[zoom_and_follow_mouse.py] logo | <Swig Object of type 'obs_source_t *' at 0x1292c39f0>
[zoom_and_follow_mouse.py] cam frame | <Swig Object of type 'obs_source_t *' at 0x1292c33c0>
[zoom_and_follow_mouse.py] webcam | <Swig Object of type 'obs_source_t *' at 0x1292c3960>
[zoom_and_follow_mouse.py] canon m50 | <Swig Object of type 'obs_source_t *' at 0x1293280f0>
[zoom_and_follow_mouse.py] PowerPoint | <Swig Object of type 'obs_source_t *' at 0x129328180>
[zoom_and_follow_mouse.py] white | <Swig Object of type 'obs_source_t *' at 0x129328150>
[zoom_and_follow_mouse.py] New source: True
[zoom_and_follow_mouse.py] Updating Monitor List
[zoom_and_follow_mouse.py] Monitor override list updated
[zoom_and_follow_mouse.py] window_capture
[zoom_and_follow_mouse.py] Source Type: window_capture
[zoom_and_follow_mouse.py] Proceeding to resize
[zoom_and_follow_mouse.py] Updating stored dimensions to match current dimensions
[zoom_and_follow_mouse.py] /usr/local/Cellar/[email protected]/3.10.7/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pywinctl/_pywinctl_macos.py:427: UninitializedDeallocWarning: leaking an uninitialized object of type NSWindow
[zoom_and_follow_mouse.py] w = AppKit.NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(frame, mask, AppKit.NSBackingStoreBuffered, False)
[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "/Users/ibby/Documents/OBS/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 820, in toggle_zoom
[zoom_and_follow_mouse.py] zoom.update_source_size()
[zoom_and_follow_mouse.py] File "/Users/ibby/Documents/OBS/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 283, in update_source_size
[zoom_and_follow_mouse.py] self.update_window_dim(self.window)
[zoom_and_follow_mouse.py] File "/Users/ibby/Documents/OBS/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 69, in update_window_dim
[zoom_and_follow_mouse.py] window_dim = window.getClientFrame()
[zoom_and_follow_mouse.py] File "/usr/local/Cellar/[email protected]/3.10.7/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pywinctl/_pywinctl_macos.py", line 490, in getClientFrame
[zoom_and_follow_mouse.py] titleHeight, borderWidth = _getBorderSizes()
[zoom_and_follow_mouse.py] File "/usr/local/Cellar/[email protected]/3.10.7/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pywinctl/_pywinctl_macos.py", line 427, in _getBorderSizes
[zoom_and_follow_mouse.py] w = AppKit.NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(frame, mask, AppKit.NSBackingStoreBuffered, False)
[zoom_and_follow_mouse.py] objc.error: NSInternalInconsistencyException - NSWindow drag regions should only be invalidated on the Main Thread!
[zoom_and_follow_mouse.py] Tracking: False
And after setting the transform to Scale to inner bounds:
[zoom_and_follow_mouse.py] window_capture
[zoom_and_follow_mouse.py] Source Type: window_capture
[zoom_and_follow_mouse.py] Proceeding to resize
[zoom_and_follow_mouse.py] Updating stored dimensions to match current dimensions
[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "/Users/ibby/Documents/OBS/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 820, in toggle_zoom
[zoom_and_follow_mouse.py] zoom.update_source_size()
[zoom_and_follow_mouse.py] File "/Users/ibby/Documents/OBS/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 283, in update_source_size
[zoom_and_follow_mouse.py] self.update_window_dim(self.window)
[zoom_and_follow_mouse.py] File "/Users/ibby/Documents/OBS/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 69, in update_window_dim
[zoom_and_follow_mouse.py] window_dim = window.getClientFrame()
[zoom_and_follow_mouse.py] File "/usr/local/Cellar/[email protected]/3.10.7/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pywinctl/_pywinctl_macos.py", line 490, in getClientFrame
[zoom_and_follow_mouse.py] titleHeight, borderWidth = _getBorderSizes()
[zoom_and_follow_mouse.py] File "/usr/local/Cellar/[email protected]/3.10.7/Frameworks/Python.framework/Versions/Current/lib/python3.10/site-packages/pywinctl/_pywinctl_macos.py", line 427, in _getBorderSizes
[zoom_and_follow_mouse.py] w = AppKit.NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(frame, mask, AppKit.NSBackingStoreBuffered, False)
[zoom_and_follow_mouse.py] objc.error: NSInternalInconsistencyException - NSWindow drag regions should only be invalidated on the Main Thread!
[zoom_and_follow_mouse.py] Tracking: True
I am on MacOS 12.6, and using OBS 28.0.3.
Thanks!