Skip to content

Plug-in / host support #1503

Open
Open

Description

@lmdsp

Plug-in / host support

Context

Typical pro audio applications (e.g. Pro Tools, Cubase, Logic Pro, etc.) are able to host plug-ins that are provided by 3rd party companies.
These usually run in realtime and provide additional audio effects, synthesizers, samples, analysis tools, etc.

Currently it is neither possible nor practical to use Sentry (or any other crash reporting solution AFAIK) inside a plug-in because

  • plug-ins are dynamic libraries that are loaded inside a hosting application
  • the host will most probably already have registered a crash reporting mechanism
  • plug-ins would compete with each other

There are a large number of host applications available, different API standards for audio plug-ins (at least VST, VST3, AU and AAX), many different OS / CPU / GPU combinations,
as well as sound card models and driver combinations.
Because of this it is quite a challenge to ensure the entire ecosystem is bug and crash free.

For host vendors, crashes caused by 3rd party plug-ins create a support burden, as customers will often direct their request to the host manufacturer.
For plug-in vendors, analyzing crashes is a time-consuming process as they need to ask the customer to retrieve the host or OS crash dump, and attempt to reproduce a bug which is often tied to a specific hardware setup.

Ideas / proposal

To overcome the current limitations, I'm wondering if it would be possible to extend the Sentry native SDK to provide a mechanism to handle this scenario.

Plug-in registration

An extension to existing plugin API's (Apple AU / Avid AAX / Steinberg VST3) would be provided so that the author of a plug-in can communicate it's Sentry endpoint (DSN) to the host,
i.e. something such as

#include <sentry.h>

class SentryExtension : public FUnknown
{
  public:
    /// @returns true if the host accepted / supports Sentry registration
    ///
    /// @note If implemented by the host, the host registers the dynamic library name and related DSN for crash reporting
    bool init_sentry(const sentry_options_t* options);

    void sentry_close();
};

Host-side redirection

Hosts run plug-ins either in-process or out-of-process, the latter being useful to avoid a buggy plug-in to bring the entire application down.
In either case, when the host's crash handler intercepts a crash, it can walk the stack trace and attempt to find a match between the offending module and Sentry endpoint.
If successful, it can then forward the crash report to the vendor's DSN.

This would require the host's manufacturer to adopt Sentry as it's crash reporting mechanism, which might or not be an obstacle to wide adoption.
Or perhaps the Sentry SDK could provide a utility that would plug-in to an existing crash report system and act as a filter to separate Sentry / non-Sentry reports?

Summary

The technical aspects do not seem to be a major challenge at first glance.
The more tricky part would in my opinion be to get the major players (Apple, Avid, Steinberg, etc.) involved to adopt and implement the specification in their products.

However I believe that the benefits it would provide them are quite convincing: reduced support burden, increased overall stability and product perception.
This would also be a nice selling point for Sentry and I'm quite confident a large portion of the plug-in vendor ecosystem would be very happy to use it.

References

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Feb 3, 2026
  2. linear commented on Feb 3, 2026

    @linear
  3. added
    Feature
    Native
    on Mar 24, 2026
  4. jpnurmi commented on Nov 6, 2026

    @jpnurmi
    Collaborator

    Thanks for the suggestion! For both in-house backends, inproc and native, we've made relevant metadata available in the event passed into on_crash in the v1 branch:

    This information can help identify the potential source of the crash, but it's good to keep in mind that the IP of the top-most stack frame is not necessarily in the module that caused the crash. For example, if a plug-in passes an invalid pointer to a system library, the crash happens inside that library. If a plug-in corrupts memory, the crash can happen much later in unrelated code, possibly in the host or another plug-in. Looking further down the stack for a plug-in module helps with the former, but not the latter. The stack is also best-effort, and can be as short as the faulting IP alone.

    With that in mind, a host can compare the instruction_addr of the frames in exception.values[0].stacktrace.frames (outermost caller first) against the image_addr and image_size of the modules in debug_meta.images to find plug-ins on the crashed stack.

    The last missing piece is to forward the crash report to the plug-in vendor's DSN from within on_crash, which we could now do with the help of the new hint argument added in #2112.

    All in all, it would become something like:

    static sentry_value_t on_crash(const sentry_ucontext_t *uctx, sentry_value_t event, sentry_hint_t *hint, void *user_data)
    {
        sentry_value_t frames = ...; // event.exception.values[0].stacktrace.frames
        sentry_value_t images = ...; // event.debug_meta.images
    
        // walk from the top-most frame towards the outermost caller
        const my_plugin_t *plugin = NULL;
        for (size_t i = sentry_value_get_length(frames); i > 0 && !plugin; i--) {
            sentry_value_t frame = sentry_value_get_by_index(frames, i - 1);
            plugin = find_plugin(frame, images);
        }
        if (plugin) {
            sentry_hint_set_dsn(hint, plugin->dsn); // TBD
        }
    
        return event;
    }

    How does this sound?

  5. added a commit that references this issue on Nov 10, 2026
    c219279
  6. self-assigned this
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FeatureNativeState: Needs Discussion

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions