sillsdev / libpalaso

Palaso Library: A set of .Net libraries useful for developers of Language Software.
MIT License
43 stars 50 forks source link

Corruption in Windows language leads to a crash #761

Open hatton opened 5 years ago

hatton commented 5 years ago

WritingSystemFromWindowsLocaleProvider:GetLanguageAndKeyboardCombinations() can crash here:

yield return Tuple.Create(cleaner.GetCompleteTag(), language.LayoutName);

with

Object reference not set to an instance of an object. Source: System.Windows.Forms Assembly: System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Stack: at System.Windows.Forms.InputLanguage.get_LayoutName() at Palaso.UI.WindowsForms.WritingSystems.WritingSystemFromWindowsLocaleProvider.<GetLanguageAndKeyboardCombinations>d__4.MoveNext() in

We cannot reproduce this, but a user is getting it. Presumably he has something corrupt in his languages installation on Windows. At the very least, we could improve the error message to list the name of the language and suggest that it may be corrupt on his machine.

ermshiperete commented 5 years ago

The stack trace looks like it's for the 2.6 branch. Does this have be fixed on the libpalaso-2.6 branch or just the master branch?

hatton commented 5 years ago

This came from WeSay, and it seems unlikely that it will get updated to master.