rabbit-shocker / rabbit

A programmable presentation tool by Ruby.
http://rabbit-shocker.org/
Other
255 stars 42 forks source link

Crash on macOS Sonoma 14.5 #161

Closed makicamel closed 1 month ago

makicamel commented 1 month ago

Hello, thank you for great product!

I get next crash when try to change drb front object.

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow geometry should only be modified on the main thread!'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff808568dc6 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff808058e9d objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff80858c78c -[NSException raise] + 9
    3   AppKit                              0x00007ff80bb8b4e4 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 235
    4   AppKit                              0x00007ff80bb98901 -[NSThemeFrame _tileTitlebarAndRedisplay:] + 111
    5   AppKit                              0x00007ff80bba9eba -[NSTitledFrame _titleDidChange] + 158
    6   AppKit                              0x00007ff80c6d9982 -[NSTitledFrame setTitle:subtitle:] + 698
    7   AppKit                              0x00007ff80bba9b7e -[NSThemeFrame setTitle:] + 50
    8   AppKit                              0x00007ff80c2394f0 -[NSFrameView _updateTitleProperties:animated:] + 53
    9   AppKit                              0x00007ff80c6ca728 -[NSThemeFrame _updateTitleProperties:animated:] + 186
    10  CoreFoundation                      0x00007ff8084eb710 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 137
    11  CoreFoundation                      0x00007ff80857c136 ___CFXRegistrationPost_block_invoke + 88
    12  CoreFoundation                      0x00007ff80857c080 _CFXRegistrationPost + 532
    13  CoreFoundation                      0x00007ff8084bb02b _CFXNotificationPost + 682
    14  Foundation                          0x00007ff809451d0e -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
    15  AppKit                              0x00007ff80c4324a2 -[NSWindowTitleController _propertiesChanged:] + 147
    16  AppKit                              0x00007ff80bba9965 -[NSWindow _dosetTitle:andDefeatWrap:] + 220
    17  libgdk-3.0.dylib                    0x000000012a55466f gdk_quartz_window_set_title + 205
    18  libgtk-3.0.dylib                    0x000000012b60cec3 gtk_window_set_title_internal + 136
    19  libffi.dylib                        0x00007ff819c9f892 ffi_call_unix64 + 82
    20  ???                                 0x000070000d799748 0x0 + 123145528383304
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      rake

Reproducing step

  1. Start rabbit with druby uri druby://127.0.0.1:10101
  2. Input next at irb or click next on rabbirack UI
require 'drb'
obj = DRbObject.new_with_uri 'druby://127.0.0.1:10101'
obj.move_to_last
# => connection closed (DRb::DRbConnError)

My macOS version is Sonoma 14.5 and Ruby version is 3.3.2.

kou commented 1 month ago

Thanks for your report. I've fixed it.

I didn't know that we can't change window from non-main thread on macOS.