appcenter-sdk-dotnet icon indicating copy to clipboard operation
appcenter-sdk-dotnet copied to clipboard

Custom stack traces from native code

Open macmade opened this issue 4 years ago • 2 comments

Description

On a project I'm working on, we generate custom crash reports for native code.
The report is generated when a C++ or SEH exceptions is thrown, and passed to the managed code. The managed code then creates a custom .NET exception and throws it, so it can be caught by the AppCenter SDK as any other managed exception.

The crash reports we generate are similar to the ones on macOS or iOS.
Like: https://gist.githubusercontent.com/macmade/e5c7b975c751876ed8833515213c768c/raw/caae71200ac68c24dac8765dea96a1639fcdf8af/gistfile1.txt

I'm trying to make AppCenter display the stack trace correctly for such reports (with the nice syntax highlight).
I know managed exceptions only contain the stack trace for the responsible thread, and I don't mind stripping down the full report, since I can upload it as attachement.

But unfortunately I can't make the AppCenter recognize a valid stack trace.
I tried different variations for the exception stack trace, such as:

   at pdflib.PDF_set_gstate in pdflib.dll
   at pdflib.PDF_set_gstate in pdflib.dll
   at pdflib.PDF_set_gstate in pdflib.dll
   at pdflib.PDF_set_gstate in pdflib.dll
   at pdflib.PDF_set_gstate in pdflib.dll
   at pdflib.PDF_fit_textflow in pdflib.dll
   at KERNEL32.BaseThreadInitThunk in KERNEL32.dll
   at ntdll.RtlUserThreadStart in ntdll.dll

This is to mimic the stack trace of managed exceptions. But no matter what I try, the stack trace is not well recognized nor highlighted.

Is there a way to generate custom stack traces from subclasses of System.Exception so they are recognized by AppCenter?

Details

  1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)?
    • Windows WPF
  2. Which SDK version are you using?
    • 2.4.0-preview
  3. Which OS version did you experience the issue on?
    • Windows 10
  4. What device version did you see this error on? Were you using an emulator or a physical device?
    • All

macmade avatar Oct 08 '19 18:10 macmade

Hey, @macmade, thanks for getting in touch. Let me discuss it with a team before giving any advices

Jamminroot avatar Oct 10 '19 11:10 Jamminroot

Hi, @macmade! I consulted my colleagues and unfortunately, we can't help you with the formatting right now, as it's an unsupported territory for our team. I will mark this issue as the "feature-request" then.

russelarms avatar Oct 18 '19 09:10 russelarms

As we do not have plans to add support for this feature in the next year, I'm closing the issue.

DmitriyKirakosyan avatar Mar 27 '24 08:03 DmitriyKirakosyan

lol

macmade avatar Mar 27 '24 10:03 macmade