Crash when attempting to open FileDialogue (MacOS)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 830
- Forks
- 108
- Avg merge
- 6d 33m
- Merged PRs (30d)
- 2
Description
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)
https://github.com/PolyMeilex/rfd/assets/34157027/96a95b44-e563-4357-ad19-b7ac1987b95f
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the macOS debug-only crash using the FileDialog::new().save_file() call from Uplink's ui/src/layouts/chats/presentation/messages/mod.rs and compare it with the import in ui/src/main.rs. Check the reported behavior on rfd 0.11.3 and 0.14.0, using the supplied macOS and Rust versions. Done means identifying and resolving the debug crash without relying on an otherwise unused FileDialog import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100