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

Remove FirstChanceException workaround #3312

Open
jamescrosswell opened this issue Apr 18, 2024 · 1 comment · May be fixed by #3411
Open

Remove FirstChanceException workaround #3312

jamescrosswell opened this issue Apr 18, 2024 · 1 comment · May be fixed by #3411

Comments

@jamescrosswell
Copy link
Collaborator

See comment here:

Since the original bug has been fixed, we shouldn't need the workaround anymore.

@bitsandfoxes
Copy link
Contributor

Coming through a support ticket:

System.NullReferenceException: Object reference not set to an instance of an object.
   at void SentryExceptionExtensions.SetSentryMechanism(Exception ex, string type, string description, bool? handled) in SentryExceptionExtensions.cs:line 38
      ex.Data[Mechanism.MechanismKey] = type;
   at void WinUIUnhandledExceptionIntegration.WinUIUnhandledExceptionHandler(object sender, object e) in WinUIUnhandledExceptionIntegration.cs:line 134
      exception.SetSentryMechanism("Microsoft.UI.Xaml.UnhandledException", description, handled);
   at Delegate EventState.GetEventInvoke()+(object sender, UnhandledExceptionEventArgs e) => { }?
   at int UnhandledExceptionEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)

Since Data is an empty collection by default I suspect the exception itself is null.

ex.Data[Mechanism.MechanismKey] = type;

Going up the callstack we get to this:

// Second part of workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/7160
if (exception.StackTrace is null)
{
exception = _lastFirstChanceException!;
}

Since this workaround now sports a bug we should re-prioritize this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants