robbielyman / seamstress

seamstress is an art engine
GNU General Public License v3.0
123 stars 12 forks source link

Crash when calling screen.set_size() from screen.resized() #84

Closed misuba closed 11 months ago

misuba commented 11 months ago

Resize the window manually to trigger, et voila:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
        0   CoreFoundation                      0x00000001a9bf7154 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x00000001a97164d4 objc_exception_throw + 60
        2   CoreFoundation                      0x00000001a9c203a0 _CFBundleGetValueForInfoKey + 0
        3   AppKit                              0x00000001acdc6638 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 320
        4   AppKit                              0x00000001acdcf780 -[NSView setFrameSize:] + 1716
        5   AppKit                              0x00000001ace04b48 -[NSTitlebarView setFrameSize:] + 88
        6   AppKit                              0x00000001acddd6f8 -[NSView setFrame:] + 304
        7   AppKit                              0x00000001acdeb05c -[NSView resizeSubviewsWithOldSize:] + 360
        8   AppKit                              0x00000001acdcf53c -[NSView setFrameSize:] + 1136
        9   AppKit                              0x00000001acdebbd0 -[NSTitlebarContainerView setFrameSize:] + 88
        10  AppKit                              0x00000001acddd6f8 -[NSView setFrame:] + 304
        11  AppKit                              0x00000001acdeb66c -[NSView resizeWithOldSuperviewSize:] + 508
        12  AppKit                              0x00000001acdeb05c -[NSView resizeSubviewsWithOldSize:] + 360
        13  AppKit                              0x00000001acdcf53c -[NSView setFrameSize:] + 1136
        14  AppKit                              0x00000001acde9cc8 -[NSThemeFrame setFrameSize:] + 244
        15  AppKit                              0x00000001acde9628 -[NSWindow _oldPlaceWindow:fromServer:] + 540
        16  AppKit                              0x00000001acde86f8 -[NSWindow _setFrameCommon:display:fromServer:] + 1832
        17  seamstress                          0x00000001004e0efc Cocoa_SetWindowSize + 232
        18  libsystem_pthread.dylib             0x00000001a9a9ada0 thread_start + 8
)
libc++abi: terminating due to uncaught exception of type NSException

This is on MacOS 13.5.2.