sharpdx / SharpDX

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

[XAudio2] CreateMasteringVoice throws InvalidOperationException #1036

Closed sa-exe closed 6 years ago

sa-exe commented 6 years ago

...when accessing the Value property of a nullable object without checking if it HasValue. Seems like a codegen issue. image

Version used: 4.1.0

amerkoleci commented 6 years ago

@jkoritzinsky any thoughts here as well?

jkoritzinsky commented 6 years ago

I'll take a look.

jkoritzinsky commented 6 years ago

@SomeAnon42 what version of SharpDX are you using?

That looks like it's using the old code-generator. (The current generated code doesn't look the same or seem to have the bug).

sa-exe commented 6 years ago

I'm using the latest version - 4.1.0. Previous versions do not have this problem.

jkoritzinsky commented 6 years ago

Found the bug. It's a bug in SharpGenTools.Sdk 1.0.0. I think it's fixed in SharpGenTools master but I'm not positive. I'll update this issue when I've verified that it's fixed.

jkoritzinsky commented 6 years ago

Yep. I ended up fixing this bug when I refactored all of the marshalling code for some of the upcoming features in SharpGenTools 1.1.0.

amerkoleci commented 6 years ago

1037 seams affected as well