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

Cannot confirm OSX compatibility (No access to any OSX machines) #218

Open
rscarson opened this issue Mar 22, 2023 · 5 comments
Open

Cannot confirm OSX compatibility (No access to any OSX machines) #218

rscarson opened this issue Mar 22, 2023 · 5 comments

Comments

@rscarson
Copy link
Owner

Should be OSX compatible, but I cannot confirm that without access to an OSX box

@yusefnapora
Copy link

Hey, this project looks super cool, nice work!

I tried building and running on a mac, but it seems to always crash a few moments after startup.

It doesn't crash right away; the "Ready to go" popup window appears, and you can go to the settings window via the menubar app. But highlighting text and pressing Ctrl+space has no effect, and after a minute or two it always dies and shows the standard macOS crash dialog.

Here's what seems to be the relevant part of the stack trace:

Thread 15 Crashed:
0   libdispatch.dylib             	       0x1a7d78924 _dispatch_assert_queue_fail + 120
1   libdispatch.dylib             	       0x1a7d7891c _dispatch_assert_queue_fail + 112
2   libdispatch.dylib             	       0x1a7d788ac dispatch_assert_queue + 196
3   HIToolbox                     	       0x1b16b26a4 islGetInputSourceListWithAdditions + 160
4   HIToolbox                     	       0x1b16b4ccc isValidateInputSourceRef + 92
5   HIToolbox                     	       0x1b16b4b8c TSMGetInputSourceProperty + 44
6   Lavendeux                     	       0x10446d6a4 enigo::macos::macos_impl::Enigo::create_string_for_key::had836d6f2af51af7 + 60
7   Lavendeux                     	       0x10446d554 enigo::macos::macos_impl::Enigo::keycode_to_string::h6ec8c8a3f7e64a03 + 44
8   Lavendeux                     	       0x10446d350 enigo::macos::macos_impl::Enigo::get_layoutdependent_keycode::haca2ede562582f3d + 164
9   Lavendeux                     	       0x10446d284 enigo::macos::macos_impl::Enigo::key_to_keycode::h9326622bae644528 + 660
10  Lavendeux                     	       0x10446cc0c _$LT$enigo..macos..macos_impl..Enigo$u20$as$u20$enigo..KeyboardControllable$GT$::key_click::h8d41b3ba5e60c795 + 48
11  Lavendeux                     	       0x1041bf2d4 lavendeux::ui::keyboard::send_sequence::h23eaea06aa13ec4e + 128 (keyboard.rs:17)
12  Lavendeux                     	       0x1041bf334 lavendeux::ui::keyboard::send_copy::h3ea97aa53bc35985 + 32 (keyboard.rs:23)
13  Lavendeux                     	       0x1041055a8 lavendeux::parser::do_parse::h164a9d54d198f8bd + 260 (parser.rs:86)
14  Lavendeux                     	       0x104104c10 lavendeux::parser::handle_shortcut::h1c182008bf233d8d + 56 (parser.rs:16)
15  Lavendeux                     	       0x1040e9ca4 lavendeux::ui::keyboard::spawn_handler::_$u7b$$u7b$closure$u7d$$u7d$::hc2a3b0fc7e3ae93e + 296 (keyboard.rs:37)
16  Lavendeux                     	       0x1044687ec std::sys_common::backtrace::__rust_begin_short_backtrace::h4b7e6cea932ae943 + 48 (backtrace.rs:121)
17  Lavendeux                     	       0x1040a3d78 std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hf4d85b910587d25c + 48 (mod.rs:558)
18  Lavendeux                     	       0x1043dad10 _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hbe359590c22f148f + 48 (unwind_safe.rs:271)
19  Lavendeux                     	       0x1042f5664 std::panicking::try::do_call::hd9e0cfd959acffcb + 180 (panicking.rs:483)
20  Lavendeux                     	       0x104302ef4 __rust_try + 32
21  Lavendeux                     	       0x1042dea94 std::panicking::try::h3d92e983b97c8298 + 136 (panicking.rs:447)
22  Lavendeux                     	       0x10421b1e0 std::panic::catch_unwind::h53a6315f1b678d93 + 48 (panic.rs:140)
23  Lavendeux                     	       0x1040a33b4 std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h91d67b3ed169d9c5 + 396 (mod.rs:557)
24  Lavendeux                     	       0x10428e1f0 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hf38cd5f750113b18 + 24 (function.rs:250)
25  Lavendeux                     	       0x1068b1a90 std::sys::unix::thread::Thread::new::thread_start::h1ffffbc3c54da1ba + 48
26  libsystem_pthread.dylib       	       0x1a7efd06c _pthread_start + 148
27  libsystem_pthread.dylib       	       0x1a7ef7e2c thread_start + 8

From a quick glance at the issues for the enigo crate, it might be the same issue as enigo-rs/enigo#153 - looks like it's also crashing in create_string_for_key.

@rscarson
Copy link
Owner Author

rscarson commented Mar 24, 2023

Do you get the same crash if you change the clipboard mode in settings to 'replace clipboard contents'?

image

You'd need to copy, press CTRL-Space then paste, but it would just be a temporary workaround until I can set the OSX build to use InputBot instead of Enigo (I can do that tomorrow first thing!)

I was using InputBot originally but it requires sudo on Linux platforms, so I opted against it.

@pentamassiv
Copy link

We are publishing a new version of enigo within the next couple of days. It might fix the issue but I am not sure. For some reason there have been reports or enigo not working in combination with Tauri. Sorry for the inconvenience.

@pentamassiv
Copy link

The new version is now available if you'd like to try it out. I would be interested to know if it fixes the issue :)

@rscarson
Copy link
Owner Author

@yusefnapora I have updated enigo in the master branch; are you still having the same crash?

If so please try switching the clipboard mode to 'replace clipboard contents' in the settings, as that may help narrow down the problem

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

No branches or pull requests

3 participants