-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building the localizer #54
Comments
Hi @LluisV |
Thank you for your quick response!
I have asked them to send me a copy of their .resw file. It is identical to the one I have. |
The only way that I can reproduce this exception message is by setting a negative value in internal static LanguageDictionary.Item CreateLanguageDictionaryItem(string name, string value)
{
(string Uid, string DependencyPropertyName) = name.IndexOf(".") is int firstSeparatorIndex && firstSeparatorIndex > 1
? (name[..firstSeparatorIndex], string.Concat(name.AsSpan(firstSeparatorIndex + 1), "Property"))
: (name, string.Empty);
return new LanguageDictionary.Item(
Uid,
DependencyPropertyName,
value,
name);
} // Exceptions:
// T:System.ArgumentNullException:
// text is null.
//
// T:System.ArgumentOutOfRangeException:
// start is less than 0 or greater than text.Length.
public static ReadOnlySpan<char> AsSpan(this string? text, int start); |
I supposed this used to work, right? Can your user try installing the app on another system? |
@AndrewKeepCoding Yes, the app has thousands of users (Windows x64 only), and this is the first one to report this error. Unfortunately he says he doesn't have access to another system. |
Is the exception gone if you pass an *.resw file with no string resources? |
@AndrewKeepCoding I just realized that I was using a 1.x version of the library. Is it possible that this bug was fixed in later versions? I see that the code for CreateLanguageDictionaryItem has changed. Edit: still happening in version 2.2 |
Update: a Resources.resw with just 1 string still fails. |
This seems to be a very rare case, and I have no idea what might be causing this issue. |
Hey, a client sent me this screenshot, which corresponds to this code snippet. I've been trying to fix it for a couple of hours, but I can't figure out what the problem is.
Do you know where the error could come from?
Thank you in advance for your time.
The text was updated successfully, but these errors were encountered: