projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.08k stars 97 forks source link

Debug windows binaries crashes on Windows and Wine #249

Closed qarmin closed 2 years ago

qarmin commented 2 years ago

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
zbraniecki commented 2 years ago

I think you should file this issue against czkawka repo

qarmin commented 2 years ago

Well, I'm creator of this app and looks that problem happens only with crosscompiled windows builds. I will try to create smaller project to reproduce

zbraniecki commented 2 years ago

I don't think your STR is sufficient then. What is czkawka_core/src/localizer.rs? Can you provide minimized testcase that reproduces it for you that uses Fluent API?

What I/O do you use? Fluent itself is not opinionated on I/O, and you seem to have an I/O error.

qarmin commented 2 years ago

"Minimal" project(I can create more minimal later) -czkawka.zip CI - https://github.com/qarmin/czkawka/pull/561 Artifacts downloaded from - https://github.com/qarmin/czkawka/actions/runs/1660541698

Debug czkawka console(crash) - debug_czkawka_console.zip Release Czkawka Gui (no crash, code exactly same as upper) - release_czkawka_gui.zip

qarmin commented 2 years ago

New 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