sudara / pamplejuce

A JUCE audio plugin template. JUCE 8, Catch2, Pluginval, macOS notarization, Azure Trusted Signing, Github Actions
https://melatonin.dev/manuals/pamplejuce
MIT License
429 stars 43 forks source link

Crash Reports + Automatic Symbolicate #121

Open satbirkira opened 1 month ago

satbirkira commented 1 month ago

Hi guys. One interesting thing that could be explored is crash reporting. As you may know, you can use Sentry to automatically upload crash reports from the plugin to their website to view. The problem is that the release build will be stripped of symbols which make it's hard to read.

Given that Github Actions is used in pamplejuce, you could technically extract the .dSYM files produced during the release compile and upload them to Sentry. If you also correctly notify sentry of the release, when a crash happens and is reported, Sentry will automatically add the symbols back into the crash report to make it readable.

Given the difficulty of obtaining meaningful crash analytics, is it worth trying to see if it can be done?


    # Step 4: Upload symbol files (e.g., dSYM or PDB)
    - name: Upload debug symbols to Sentry
      env:
        SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
        SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
        SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
      run: |
        # Install Sentry CLI
        curl -sL https://sentry.io/get-cli/ | bash

        # Upload .dSYM or .PDB files to Sentry (adjust path accordingly)
        sentry-cli upload-dif /path/to/symbol/files

    # Optional: Notify Sentry about the release
    - name: Notify Sentry about the new release
      env:
        SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
        SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
        SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
      run: |
        sentry-cli releases new "v${{ github.sha }}"
        sentry-cli releases finalize "v${{ github.sha }}"
sudara commented 1 month ago

Definitely worth exploring. I've never personally looked into it, but I've always assumed as a dll inside a host, the options are limited:

https://forum.juce.com/t/crash-reporting-from-within-a-dll-audio-plugin/15485/19?u=sudara

On macOS, I've heard of people scanning the crash logs directory and sending it if they find their plugin ID.

On windows, I've heard cubase and live save crash logs... but again, I haven't had any direct experience. I think running inside hosts either in-process or sandboxed makes it a complex problem to solve!

satbirkira commented 1 month ago

Awesome. I guess if anyone has a repo or code they would like to share please do!