microsoft / microsoft/WPF-Samples
Overflow exception in ReadLookAheadCharacter in WPF-Samples-main\WPF-Samples\Sample Applications\HtmlToXamlDemo
@anjaligupta-dev is already working on this.
Since Dec 14, 2023.
- Dominant language
- C#
- Stars
- 5.7k
- Forks
- 3.3k
- Avg merge
- 12d 8h
- Merged PRs (30d)
- 2
Description
I have an WPF application in which i am using the classes (htmlLexicalAnalyzer.cs, HtmlToXAMLConverter, etc.) from the sample application HtmlToXAMLDemo (the main repo).
I have changed the namespace of that classes for mine only.
Then in my physical pc is working correctly (no errors nor exceptions).
Then I create an MSI and deploy my WPF application to a new clean and fresh pc (a virtual machine). After installation I execute it and I get the below exception:
System.OverflowException: Arithmetic operation resulted in an overflow.
at myApp.Converters.HtmlConverter.HtmlLexicalAnalyzer.ReadLookAheadCharacter()
at myApp.Converters.HtmlConverter.HtmlLexicalAnalyzer.GetNextCharacter()
at myApp.Converters.HtmlConverter.HtmlLexicalAnalyzer.GetNextTagToken()
at myApp.Converters.HtmlConverter.HtmlParser.ParseHtmlContent()
at myApp.Converters.HtmlConverter.HtmlToXamlConverter.ConvertHtmlToXaml(String htmlString, Boolean asFlowDocument)
at myApp.UI.HtmlRichTextBoxBehavior.OnValueChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
It looks like there is something wrong in ReadLookAheadCharacter that is causing this exception in some particular scenario like mine.
Please, could you have a look at it and fix it? Thanks in advance.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.