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

Include C# stack trace with ANRs #2179

Closed
mattjohnsonpint opened this issue Feb 13, 2023 · 2 comments
Closed

Include C# stack trace with ANRs #2179

mattjohnsonpint opened this issue Feb 13, 2023 · 2 comments
Labels
Feature New feature or request

Comments

@mattjohnsonpint
Copy link
Contributor

Problem Statement

The Android and iOS embedded SDKs will capture ANRs / App Hangs for MAUI apps. However, they details they capture don't include anything that will help a .NET developer identify the source of the hang. The stack trace only includes the native code.

For example, writing a button click handler like this:

private void OnHangClicked(object sender, EventArgs e)
{
    while (true)
    {
        // Hang
    }
}

on Android shows an ANR like this:

image

and on IOS shows like this:

image

... neither of which are useful to get back to the infinite loop in the C# code.

Solution Brainstorm

We might be able to capture a managed stack trace manually and include it (as an attachment?) with the native error.

@mattjohnsonpint mattjohnsonpint added Feature New feature or request Platform: .NET labels Feb 13, 2023
@mattjohnsonpint
Copy link
Contributor Author

Note that some breadcrumbs are still useful here. I can still see the button click, for example. But if the actual code hanging was far from that click handler, we'd have no way to see it.

@mattjohnsonpint
Copy link
Contributor Author

After discussion, we don't think this is feasible. If anyone has ideas though, feel free to reply here and we can consider them. Thanks!

@mattjohnsonpint mattjohnsonpint closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant