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

Managed Debugging Assistant CallbackOnCollectedDelegate after dialog gets closed #4

Open
chucker opened this issue Apr 19, 2018 · 0 comments

Comments

@chucker
Copy link

chucker commented Apr 19, 2018

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.

chucker added a commit to chucker/TaskDialogLib that referenced this issue Apr 19, 2018
chucker added a commit to chucker/TaskDialogLib that referenced this issue Apr 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant