Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Managed Debugging Assistant CallbackOnCollectedDelegate after dialog gets closed #4

@chucker

Description

@chucker

I'm calling the lib as follows:

var d = new MyTaskDialog();
var result = d.ShowModal(this);

MyTaskDialog has a custom button (style CommandLinks), a default icon, and a title. (This appears to also happen with an even simpler dialog.)

After clicking the button, the Managed Debugging Assistant CallbackOnCollectedDelegate throws. As I understand it, this is roughly a use-after-free error:

The callbackOnCollectedDelegate managed debugging assistant (MDA) is activated if a delegate is marshaled from managed to unmanaged code as a function pointer and a callback is placed on that function pointer after the delegate has been garbage collected.

As I understand it, the Show() method in TaskDialog cleans up hr too early.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions