yds12 / tarsila

Pixel art and spritesheet editor
Other
141 stars 7 forks source link

When I press on "export image" on Windows 11, it crashes #15

Open yahyaabdulmohsin opened 1 year ago

yahyaabdulmohsin commented 1 year ago

The title is self-explanatory, I didn't take a look at the code to see why, but it does. The crash is not instantaneous, my cursor starts loading for a second or two, then it crashes.

yds12 commented 1 year ago

Hi, thanks for the feedback! If you ran it via terminal, could you share the output?

yahyaabdulmohsin commented 1 year ago

This is the last couple of lines showing: (I am just building it with cargo run btw) [lapix\src\state.rs:334] t0.elapsed().unwrap() = 13.6µs [lapix\src\state.rs:105] &event = Bucket( Point { x: -45, y: -5, }, ) [lapix\src\state.rs:334] t0.elapsed().unwrap() = 1.6µs error: process didn't exit successfully: target\debug\tarsila.exe (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

quiet-bear commented 1 year ago

Are you able to give more information? I'm on Windows 11 as well and haven't had the program crash when clicking export image (only temporarily when saving the image from the file dialog in #4). Could you also confirm that save / load project, and import image is working?

yahyaabdulmohsin commented 1 year ago

Are you able to give more information? I'm on Windows 11 as well and haven't had the program crash when clicking export image (only temporarily when saving the image from the file dialog in #4). Could you also confirm that save / load project, and import image is working?

save/load, and import are not working as well. It seems to me that every time the program tries to access the system files navigator it crashes. If there is a discord server or something, I am willing to share screen.

quiet-bear commented 1 year ago

I might not have time until later this week to look into this, but if you want to get a head start you can take a peek around here, specifically dialog.save_file() as that's where it should open the native file dialog.

The rfd crate which handles the file dialogs is also a little outdated, so you can also see if updating to 0.11.2 helps you out (I didn't notice any breaking changes on Windows or Linux, @yds12 would need to approve of updating the crate if that's the issue though).

yds12 commented 1 year ago

In the issue I opened with rfd I found that the minimal setup to cause trouble was to use rfd with egui-miniquad (we use egui-macroquad, which is a thin wrapper around egui-miniquad). That issue is for MacOS, but it could be that with Windows it arises there as well. I know that macroquad has some unsafe code (not sure about rfd and egui) so this memory violation issue could be arising from it (just a wild guess).

The rfd crate which handles the file dialogs is also a little outdated, so you can also see if updating to 0.11.2 helps you out (I didn't notice any breaking changes on Windows or Linux, @yds12 would need to approve of updating the crate if that's the issue though).

For dependency version bumps, please feel free to open PRs whenever you wish.