sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.69k stars 641 forks source link

MediaFoundation attributes/dxgimanager throws StackOverflowException #1039

Closed amwx closed 6 years ago

amwx commented 6 years ago

The latest version of the MediaFoundation dll (4.1.0.0) throws a StackOverflowException when attempting to set the DXGIManager in the MediaEngineAttributes

`MediaEngineAttributes attr = new MediaEngineAttributes();

attr.DxgiManager = dxgiManager; // Stackoverflow thrown when this line is executed`

And this is all following the Desktop Video Player Sample App.

I have another app that I wrote about a year ago that targets version 3.1 of the SharpDX dlls, and it runs fine, so I am assuming the cause is something that changed between v3.1 and v4.1?

amerkoleci commented 6 years ago

@jkoritzinsky Same here?

jkoritzinsky commented 6 years ago

This one's a bug in SharpDX after switching the definition of ComObject/IUnknown to not be special. I'm working on a PR for it now.

Ixiodor commented 5 years ago

Problem is still here...why closed?

DTXMania commented 5 years ago

from MSDN:

The IsSubclassOf method cannot be used to determine whether an interface derives from another interface, or whether a class implements an interface.

Dont change line 278 of MediaAttributes.cs.