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

Dragging and dropping file from file dialog to winit window causes memory corruption on windows. #71

Open
Kl4rry opened this issue Jun 4, 2022 · 6 comments

Comments

@Kl4rry
Copy link

Kl4rry commented Jun 4, 2022

When a file is dragged from an open rfd dialog and dropped in a winit window the program crashes with the error:

(exit code: 0xc0000374, STATUS_HEAP_CORRUPTION)
@PolyMeilex
Copy link
Owner

Hi!

  1. Is this async dialog or sync one?
  2. If it is sync, is there any threading involved?
  3. Could you perhaps provide a full rust-gdb backtrace? That would be helpful.

@Be-ing
Copy link
Contributor

Be-ing commented Jun 4, 2022

What OS?

@PolyMeilex
Copy link
Owner

PolyMeilex commented Jun 4, 2022

STATUS_HEAP_CORRUPTION looks like Microsoft COM error, so I assume windows. Winit uses COM to handle it's drag and drop so we are probably having some races related to that. I remember having the same problems with cpal audio + winit drag and drop

@Kl4rry
Copy link
Author

Kl4rry commented Jun 4, 2022

  1. The sync dialog was used
  2. The dialog was spawned from a second thread to avoid blocking the winit main thread
    I would provid a rust-gdb backtrace if i knew how to create one.

@PolyMeilex
Copy link
Owner

rust-gdb should be available out of the box in rust toolchain.

1. rust-gdb ./path/to/binary
2. type in `run` (or `r` for short)
3. reproduce the crash
4. type in `backtrace`

@Kl4rry
Copy link
Author

Kl4rry commented Jun 4, 2022

It does not seem to be avaliable by default. I ran in to this isssue while trying to run it rust-lang/rustup#2838. Both using the gnu and msvc toolchains.

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

3 participants