mirror of
https://github.com/serrebidev/BlindRSS.git
synced 2026-08-13 11:59:26 -07:00
Application crashes due to invalid .mo translation files generated during the build #47
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
serrebi/BlindRSS#47
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The BlindRSS application (version 1.79.0) crashes immediately on startup when it attempts to load translations from the
.mofiles produced by the automated build process.Preconditions
Steps to Reproduce
BlindRSS.exe.Actual Behavior
rss.dbfile.Expected Behavior
Additional Observations
.mofile fixes the crash: If the file_internal\locale\ru\LC_MESSAGES\blindrss.mois removed from the distribution, BlindRSS starts successfully with the English UI and works as intended..moworks correctly: When taking theblindrss.pofile from the repository and compiling it intoblindrss.mousing the standardmsgfmtutility (from GNU gettext), and then placing that file into the application directory, BlindRSS launches correctly with the Russian interface.This confirms that the issue is specifically with the
.mofiles generated during the automated build, not with the translation content itself or the runtime environment.Root Cause Analysis
The build process uses a custom Python script (
tools/compile_translations.py) to compile.pofiles into.moformat, instead of relying on the official GNU gettext toolchain. This custom implementation contains several critical flaws relative to the MO file specification:msgidandmsgid_pluralwith a\0separator and stores plural translations as a single\0-separated string. This does not match the MO format specification, where plural forms are represented as multiple distinct entries. As a result, the gettext runtime cannot correctly resolve plural translations, leading to undefined behavior or crashes.msgfmt, the custom script does not validate the input.pofile for common issues (e.g., mismatched format specifiers in%s,%d, etc.). Any subtle error in the PO file is silently transformed into a corrupted MO file.Because POEdit and
msgfmtimplement the MO format specification correctly, manually compiled files work as expected, further isolating the problem to the custom compilation script.Recommendation
Discontinue the use of the custom
tools/compile_translations.pyscript for generating.mofiles. Instead, integrate the standard GNU gettextmsgfmtutility into the build pipeline. This will ensure:Adopting the standard tooling will eliminate the risk of generating invalid MO files and prevent future crashes related to translation loading.
On the latest versions the bug is no longer reproducible.
This issue is fully resolved with the release of v1.80.3, which rolls back the problematic gettext internationalization changes and ensures stable .mo translation compilation and runtime behavior.