cargo-i18n icon indicating copy to clipboard operation
cargo-i18n copied to clipboard

Debug windows binaries crashes on Windows and Wine

Open qarmin opened this issue 4 years ago • 1 comments

When I compiled my app on Linux(both Debug and Release) or Windows(only Release), then everything works fine. But when I started to use debug Windows builds(without any code change, except changing windows build to console), then I start to have this crashes when starting app(even with RUST_BACKTRACE=full don't show more detailed backtrace)

thread 'main' panicked at 'Error while loading fallback language: LanguageNotAvailable("en/czkawka_core.ftl", LanguageIdentifier { language: Language(Some("en")), script: None, region: None, variants: None })', czkawka_core/src/localizer.rs:17:51

This issue was also created here https://github.com/projectfluent/fluent-rs/issues/250

Minimal project - https://github.com/qarmin/czkawka/tree/test_crash Binaries not stripped(release - no crash, debug crash) - https://github.com/qarmin/czkawka/actions/runs/1662075703

qarmin avatar Jan 10 '22 08:01 qarmin

@qarmin sorry for the slow reply! Could it be related to the difference in behaviour between Debug and Release builds for rust-embed? As per the documentation:

  • In debug and when debug-embed feature is not enabled, the folder path is resolved relative to where the binary is run from.
  • In release or when debug-embed feature is enabled, the folder path is resolved relative to where Cargo.toml is.

kellpossible avatar Feb 10 '22 13:02 kellpossible

@qarmin hello did you see my reply? 🙂

kellpossible avatar Jan 23 '23 09:01 kellpossible

Yes, I tried to confirm that issue happens due this behavior, but I failed to do. Currently I use only Linux and Windows version is always exported with release mode so I don't a problem anymore(also not so much time to verify it) so if no one has a similar problem then I'll just close the issue

qarmin avatar Jan 24 '23 21:01 qarmin

Great thanks!

kellpossible avatar Jan 24 '23 21:01 kellpossible