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

Crash when attempting to open FileDialogue (MacOS) #183

Open
Flemmli97 opened this issue Mar 6, 2024 · 0 comments
Open

Crash when attempting to open FileDialogue (MacOS) #183

Flemmli97 opened this issue Mar 6, 2024 · 0 comments

Comments

@Flemmli97
Copy link

Flemmli97 commented Mar 6, 2024

For a project of ours we make use of rfd to open a FileDialog to e.g. select some directory to download files to.
You can see our project here:
https://github.com/Satellite-im/Uplink

During that we (or rather I as i am the only one on the team experiencing this crash) discovered that attempting to open the FileDialog will crash our app. This is ONLY in a debug run and does NOT happen in a release version.

One location where we open the FileDialog can be seen here:
https://github.com/Satellite-im/Uplink/blob/dev/ui/src/layouts/chats/presentation/messages/mod.rs#L775

I dug into it a bit and found out some points:
By copy pasting this line of code around the app

if let Some(file_path_to_download) = FileDialog::new().save_file() {}

i managed to find out that by simply having the import line use rfd::FileDialog; in our main rs file
https://github.com/Satellite-im/Uplink/blob/dev/ui/src/main.rs
makes it not crash anymore for some reason.

Additionally i tried a blank new project with the above FileDialog code and it worked there too.
Lastly while our project is still on 0.11.3 i also tried it out on 0.14.0 where the same behaviour happened.

The crash itself does not show in the logs though.

Additional Info:

OS: MacOS 13.6.4 (22G513)
Rust: rustc 1.76.0 (also tried with 1.78-nightly)

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

No branches or pull requests

1 participant