Open Quackdoc opened 5 months ago
In addition, when distros use a "weird" libexecdir
for geoclue, the same thing occurs, as seen in Solus:
/usr/lib64/geoclue/geoclue-2.0/demos/agent
@ikeycode you can set the location at compile time export GEOCLUE_AGENT="/usr/lib64/geoclue/geoclue-2.0/demos/agent" cargo build...
I don't doubt that you can :) However without any kind of configure or build option summary, or digging into the Makefile (when the git submodules repo uses justfile) - this isn't remotely obvious.
On Sun, 21 Apr 2024, 18:21 Mitchel Stewart, @.***> wrote:
@ikeycode https://github.com/ikeycode you can set the location at compile time export GEOCLUE_AGENT="/usr/lib64/geoclue/geoclue-2.0/demos/agent" cargo build...
— Reply to this email directly, view it on GitHub https://github.com/pop-os/cosmic-settings-daemon/issues/14#issuecomment-2068140202, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMWLIWQEPLF5WGAYHCZY36TY6PYQPAVCNFSM6AAAAABFHY4OT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYGE2DAMRQGI . You are receiving this because you were mentioned.Message ID: @.***>
I was also seeing this issue when geoclue2 isn't installed.
A more useful error message would be helpful.
Is geoclue a hard requirement? It would be nice if the program didn't crash when its not available.
If geoclue is not available for one reason or another, cosmic-settings-daemon will fail to run, the fix can be as simple as the below patch. I do however get the below stacktrace when doing this. I'm not sure if it's directly related or not. however this breaks setting theme in GTK applications. It takes a while for the segfault to occur. once it does occur, the theme can change once, and then never again afterwards.
Click me
``` Geoclue failed with No such file or directory (os error 2) Failed to watch theme org.freedesktop.DBus.Error.NoReply: Remote peer disconnected Stack backtrace: 0: anyhow::error::::run at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/mod.rs:416:9 19: tokio::task::local::LocalSet::tick::{{closure}} at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:676:63 20: tokio::runtime::coop::with_budget at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:107:5 21: tokio::runtime::coop::budget at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:73:5 22: tokio::task::local::LocalSet::tick at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:676:31 23: as core::future::future::Future>::poll::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:982:16
24: tokio::task::local::LocalSet::with::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:730:13
25: std::thread::local::LocalKey::try_with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
26: std::thread::local::LocalKey::with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
27: tokio::task::local::LocalSet::with
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:728:9
28: as core::future::future::Future>::poll
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:968:9
29: tokio::task::local::LocalSet::run_until::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:635:19
30: cosmic_settings_daemon::main::{{closure}}
at ./src/main.rs:566:10
31: as core::future::future::Future>::poll
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
32: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:659:57
33: tokio::runtime::coop::with_budget
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:107:5
34: tokio::runtime::coop::budget
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:73:5
35: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:659:25
36: tokio::runtime::scheduler::current_thread::Context::enter
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:404:19
37: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:658:36
38: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:737:68
39: tokio::runtime::context::scoped::Scoped::set
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/scoped.rs:40:9
40: tokio::runtime::context::set_scheduler::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context.rs:176:26
41: std::thread::local::LocalKey::try_with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
42: std::thread::local::LocalKey::with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
43: tokio::runtime::context::set_scheduler
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context.rs:176:9
44: tokio::runtime::scheduler::current_thread::CoreGuard::enter
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:737:27
45: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:646:19
46: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:175:28
47: tokio::runtime::context::runtime::enter_runtime
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/runtime.rs:65:16
48: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:167:9
49: tokio::runtime::runtime::Runtime::block_on
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/runtime.rs:348:47
50: cosmic_settings_daemon::main
at ./src/main.rs:329:5
51: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
52: std::sys_common::backtrace::__rust_begin_short_backtrace
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
53: std::rt::lang_start::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:167:18
54: core::ops::function::impls:: for &F>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
55: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
56: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
57: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
58: std::rt::lang_start_internal::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
59: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
60: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
61: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
62: std::rt::lang_start_internal
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
63: std::rt::lang_start
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:166:17
64: main
65:
66: __libc_start_main
67: _start. Will try again in 0s
```
EDIT: installed geoclue and recompiled the app with proper envvar and it now works fine without segfault, so it does seem related