Repository navigation
Closed
Labels
0.kind: bugSomething is broken
Description
Describe the bug
Espanso builds on aarch64-darwin but crashes at runtime.
Steps To Reproduce
I've tried removing caches, the socket, and the config directory.
$ RUST_BACKTRACE=full nix shell --impure github:nixos/nixpkgs/master#espanso -c espanso launcher
12:21:00 [daemon(82385)] [INFO] reading configs from: "/Users/n8henrie/.config/espanso"
12:21:00 [daemon(82385)] [INFO] reading packages from: "/Users/n8henrie/.config/espanso/match/packages"
12:21:00 [daemon(82385)] [INFO] using runtime dir: "/Users/n8henrie/Library/Caches/espanso"
12:21:00 [daemon(82385)] [INFO] system info: Darwin v13.4.1 - kernel: 22.5.0
12:21:00 [daemon(82385)] [INFO] watching for changes in path: "/Users/n8henrie/.config/espanso"
12:21:00 [daemon(82385)] [INFO] espanso version: 2.1.8
12:21:00 [daemon(82385)] [INFO] spawning the worker process...
12:21:00 [daemon(82385)] [INFO] binded to IPC unix socket: /Users/n8henrie/Library/Caches/espanso/espansodaemonv2.sock
12:21:00 [worker(82386)] [INFO] reading configs from: "/Users/n8henrie/.config/espanso"
12:21:00 [worker(82386)] [INFO] reading packages from: "/Users/n8henrie/.config/espanso/match/packages"
12:21:00 [worker(82386)] [INFO] using runtime dir: "/Users/n8henrie/Library/Caches/espanso"
12:21:00 [worker(82386)] [INFO] system info: Darwin v13.4.1 - kernel: 22.5.0
12:21:00 [worker(82386)] [INFO] binded to IPC unix socket: /Users/n8henrie/Library/Caches/espanso/espansoworkerv2.sock
12:21:00 [worker(82386)] [INFO] using CocoaAppInfoProvider
12:21:00 [worker(82386)] [INFO] monitoring the status of the daemon process
12:21:00 [worker(82386)] [INFO] monitoring the status of secure input
12:21:00 [worker(82386)] [INFO] using CocoaSource
12:21:00 [daemon(82385)] [ERROR] received unexpected exit code from worker 90, exiting
thread 'main' panicked at 'failed to launch daemon: unexpected error, 'espanso daemon' returned a non-zero exit code.', espanso/src/cli/launcher/mod.rs:213:45
stack backtrace:
0: 0x1009c3e48 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdbda7bad23d0989b
1: 0x1009f2790 - core::fmt::write::ha7185724a9074a24
2: 0x1009d40d0 - std::io::Write::write_fmt::h39b76246c43beee5
3: 0x1009c3c58 - std::sys_common::backtrace::print::h9ab79e95a8514b2a
4: 0x1009d1360 - std::panicking::default_hook::{{closure}}::h70d1ee0541384b30
5: 0x1009d1028 - std::panicking::default_hook::h0c694e5a46d81a66
6: 0x1009d1970 - std::panicking::rust_panic_with_hook::h7c5b1bba2687e431
7: 0x1009c4134 - std::panicking::begin_panic_handler::{{closure}}::h987019bf6abca606
8: 0x1009c3f40 - std::sys_common::backtrace::__rust_end_short_backtrace::hfb3419c4c717fc35
9: 0x1009d158c - _rust_begin_unwind
10: 0x100a20838 - core::panicking::panic_fmt::h5f01a4ff4c7b4c75
11: 0x100a20c04 - core::result::unwrap_failed::he6fa6ecd36446cc9
12: 0x1005cd7c4 - espanso::cli::launcher::launcher_main::he40a224b906047c7
13: 0x1005b0550 - espanso::main::h0474c4c09d7623ed
14: 0x10057a5d4 - std::sys_common::backtrace::__rust_begin_short_backtrace::h92876866a6e51a8e
15: 0x10055a5b8 - std::rt::lang_start::{{closure}}::h80015b9063749177
16: 0x1009d14b0 - std::panicking::try::h6910f825b820c47a
17: 0x1009d85a4 - std::rt::lang_start_internal::hce9a5566c4a2c217
18: 0x1005b1a40 - _mainExpected behavior
nix-installed espanso should run without crashing
Additional context
Espanso 2.1.8 builds and runs from source without crashing
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"aarch64-darwin"`
- host os: `Darwin 22.5.0, macOS 13.4.1`
- multi-user?: `no`
- sandbox: `yes`
- version: `nix-env (Nix) 2.13.3`
- channels(n8henrie): `""`
- channels(root): `""`
- nixpkgs: `not found`Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is broken
Activity
nixos-discourse commentedon Aug 5, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/rust-debug-symbols-not-working-in-rust-lldb/31343/1
n8henrie commentedon Apr 4, 2024
Looking more closely at the crash logs in Console.app and adding a lot of debug print statements, it seems to be crashing at this line of
unsafecode: https://github.com/espanso/espanso/blob/db97658d1d80697a635b57801696c594eacf057b/espanso-detect/src/mac/mod.rs#L253n8henrie commentedon Apr 7, 2024
With more print debugging, it seems to crash right at this
dispatch_asynccall.nixos-discourse commentedon Apr 8, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/rust-ffi-call-to-dispatch-async-crashes-when-built-with-nix/42977/1
Fix non-void function missing a return
n8henrie commentedon Apr 13, 2024
Upstream issue: espanso/espanso#1945
Does anyone know why this compiles and runs fine with the host toolchain on aarch64-darwin but crashes (at runtime) when compiled with nix?
Some kind of different compile flags I'm sure.
nixos-discourse commentedon Apr 13, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/rust-ffi-call-to-dispatch-async-crashes-when-built-with-nix/42977/2
nixos-discourse commentedon Apr 13, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/darwin-missing-return-value-in-void-function-crashes-with-trace-bpt-trap-5/43343/1
Fix non-void function missing a return
Fix non-void function missing a return (#1946)
n8henrie commentedon Jul 25, 2024
This was fixed by updating espanso to a non-tagged version.
Pre release (#2124)
Fix non-void function missing a return (espanso#1946)