Skip to content
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

Logging a 01h causes parent app to crash #81

Open
RayYeomans opened this issue May 22, 2023 · 0 comments
Open

Logging a 01h causes parent app to crash #81

RayYeomans opened this issue May 22, 2023 · 0 comments

Comments

@RayYeomans
Copy link

RayYeomans commented May 22, 2023

I have a process that parses XML files. One of those files is corrupt. In my try..catch block, I Log.Warning the ex.message.

That message is:
"Name cannot begin with the '" & ChrW(1) & "' character, hexadecimal value 0x01. Line 1084, position 71."
Note that this is the debugger message, so the CharW(1) is actually a 01h character.

This causes the whole parent app to crash, with these messages (and I have substituted the string [01h] for the actual character):

XamlParseException: '[01h]', hexadecimal value 0x01, is an invalid character. Line 1, position 468.

Error parsing `<Paragraph xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml:space="preserve"><Run Foreground="#808080">[</Run><Run Foreground="#c0c0c0">14:24:41</Run><Run Foreground="#808080"> </Run><Run Foreground="#ffff00">WRN</Run><Run Foreground="#808080">] </Run><Run Foreground="#00ffff">_[My File Name]_</Run><Run Foreground="#ffffff">: </Run><Run Foreground="#00ffff">Name cannot begin with the &apos;[01h]&apos; character, hexadecimal value 0x01. Line 1084, position 71.</Run>
</Paragraph>` to XAML: '[01h]', hexadecimal value 0x01, is an invalid character. Line 1, position 468.
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in WindowsBase.dll
Exception has been thrown by the target of an invocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant