-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Crash when trying to get any monitor #1893
Comments
I get the same hang on Linux/Wayland with tauri 1.0.0-beta.1. Edit: I guess this is a deadlock because tauri tries to schedule something and wait for it while we are currently in the scheduler thread. Starting a new thread and calling |
I can confirm this is a Tauri issue, WRY and Tao can get the monitors but Tauri can't. The following code returns Some(MonitorHandle { inner: MonitorHandle(0x10001) })
|
On Linux the API is not implemented yet. I'll investigate the issue on Windows. |
The problem here is that Example code that works: .setup(|app| {
let window = app.get_window("main").unwrap();
std::thread::spawn(move || {
println!("This will print!");
let _monitors = window.available_monitors();
println!("This will print!");
});
Ok(())
}) |
Describe the bug
The execution of the program stops when I try to use primary_monitor(), available_monitors() or current_monitor().
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Can get monitors and, at least, not crash the program.
Screenshots
Images on here (imgur link).
Platform and Versions:
OS: Windows, version 10.0.19041 X64
Node: 16.2.0
NPM: 7.13.0
Yarn: 1.22.10
Rustc: 1.52.1
Webview2: 90.0.818.66
@tauri-apps/cli: 1.0.0-beta.1
@tauri-apps/api: Not installed
Additional context
Important!
This is the output of Tao's monitor_list example:
Also, this issue applies on 2 separate Windows machines.
Stack Trace
I don't know how to get a stack trace, but I will happy to provide one if the issue needs it.
The text was updated successfully, but these errors were encountered: