CreateNewLangProj throws when the default analysis writing system's ICU locale differs from its tag
まだ誰も着手していません。
評価
調査の方向性
LcmCache.CreateNewLangProjから始め、民族誌リストのファイルが指定されていない場合にInitializeAnthroListがどのように書記体系を選択するかを追ってください。その検索を、issueが既存の例として挙げているCreateAnalysisWritingSystemと比較してください。提示されたpt-BRの呼び出しで再現し、タスクを未完了のまま残したり、キャッシュの破棄時に例外を発生させたりせずに呼び出しが成功することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
LcmCache.CreateNewLangProj throws when no anthropology list file is passed and the default analysis writing system's ICU locale differs from its language tag. pt-BR is one such writing system: its ICU locale is pt_BR.
Cause
With no list file, InitializeAnthroList names the empty Anthropology Categories list in the default analysis writing system. It finds that writing system with:
cache.WritingSystemFactory.GetWsFromStr(analWrtSys != null ? analWrtSys.IcuLocale : userIcuLocale)
GetWsFromStr looks writing systems up by language tag. For pt-BR it gets pt_BR, returns 0, and set_String(0, ...) throws. By then the project is already on disk.
FLEx's new-project dialog passes the FRAME list by default, so FLEx only hits this when the user picks an empty, user-defined list. Callers that create projects without a list file hit it every time.
Repro
LcmCache.CreateNewLangProj(progress, "Test", dirs, synchronizeInvoke,
new CoreWritingSystemDefinition("pt-BR") { Id = "pt-BR" },
new CoreWritingSystemDefinition("fr") { Id = "fr" }, "en",
new HashSet<CoreWritingSystemDefinition>(), new HashSet<CoreWritingSystemDefinition>(), null);
The real exception is hidden. The failed call leaves a non-undoable task open, so disposing the cache throws SynchronizationLockException.
Fix
Look the writing system up by analWrtSys.Id, as CreateAnalysisWritingSystem already does.
- 主要言語
- C#
- スター
- 3
- フォーク
- 15
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/liblcm のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
-
Saving run text that contains a lone (unpaired) surrogate throws in TsString normalization対応中かも @johnml1135 が 11 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
-
Text props: an unknown writing-system handle is saved as ws="", which no reader can load対応中かも @johnml1135 が 11 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
Text property XML: writer emits properties and values its own reader rejects (record fails to load)対応中かも @johnml1135 が 12 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
sillsdev/liblcm の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
conductor-oss/csharp-sdk#183 ·
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
unoplatform/uno#26555 ·
メンテナーはふだん 1 日以内に返信
-
Search button on a book does not retry without the author when the full query finds nothing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Listenarrs/Listenarr#1173 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
CactuseSecurity/firewall-orchestrator#5739 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信