Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby crashes during require "tk" on Mac OS 15 #64

Open
rongcuid opened this issue Jan 12, 2025 · 2 comments
Open

Ruby crashes during require "tk" on Mac OS 15 #64

rongcuid opened this issue Jan 12, 2025 · 2 comments

Comments

@rongcuid
Copy link

I am on Mac OS 15.2 M2, using Ruby 3.4.1 which is installed from chruby, and it seems that #33 has reappeared:

irb(main):001> require "tk"
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow should only be instantiated on the main thread!'
*** First throw call stack:
(
        0   CoreFoundation                      0x000000018df12e80 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x000000018d9facd8 objc_exception_throw + 88
        2   CoreFoundation                      0x000000018df37534 _CFBundleGetValueForInfoKey + 0
        3   AppKit                              0x0000000191a1ac4c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 260
        4   AppKit                              0x0000000191a1ab3c -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48
        5   libtk8.6.dylib                      0x0000000127b0bb5c TkMacOSXMakeRealWindowExist + 496
        6   libtk8.6.dylib                      0x0000000127b0b85c TkWmMapWindow + 56
        7   libtk8.6.dylib                      0x0000000127a7cffc MapFrame + 76
        8   libtcl8.6.dylib                     0x000000012784450c TclServiceIdle + 84
        9   libtcl8.6.dylib                     0x0000000127828660 Tcl_DoOneEvent + 296
        10  libtk8.6.dylib                      0x0000000127aff81c TkpInit + 712
        11  libtk8.6.dylib                      0x0000000127a76030 Initialize + 2372
        12  tcltklib.bundle                     0x00000001273b0584 ruby_tk_stubs_init + 12
        13  tcltklib.bundle                     0x00000001273b4a08 ip_init + 852
        14  ruby                                0x0000000104e41aec vm_call_cfunc_with_frame_ + 240
        15  ruby                                0x0000000104e25d64 vm_exec_core + 9248
        16  ruby                                0x0000000104e22430 rb_vm_exec + 492
        17  ruby                                0x0000000104e48398 rb_call0 + 888
        18  ruby                                0x0000000104d1d574 rb_class_new_instance_pass_kw + 64
        19  ruby                                0x0000000104e41aec vm_call_cfunc_with_frame_ + 240
        20  ruby                                0x0000000104e25d64 vm_exec_core + 9248
        21  ruby                                0x0000000104e22430 rb_vm_exec + 492
        22  ruby                                0x0000000104e368c4 vm_invoke_proc + 712
        23  ruby                                0x0000000104df68f0 thread_do_start_proc + 668
        24  ruby                                0x0000000104df5fbc thread_start_func_2 + 796
        25  ruby                                0x0000000104df5b38 nt_start + 248
        26  libsystem_pthread.dylib             0x000000018ddb82e4 _pthread_start + 136
        27  libsystem_pthread.dylib             0x000000018ddb30fc thread_start + 8
)
libc++abi: terminating due to uncaught exception of type NSException
[1]    39903 abort      irb
@jeremyevans
Copy link
Contributor

Just to confirm, does this crash happen on Ruby 3.3?

@rongcuid
Copy link
Author

Yes, it occurs on 3.3 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants