Felix
Felix

Reputation: 4081

EETypeLoadException in AudioBuffer.CreateReference()

I'm doing some audio capturing based on scenario 3 of this sample, and noticed that an EETypeLoadException is shown in the Output:

Exception thrown at 0x753296C2 in AudioCreation.exe: Microsoft C++ exception: EETypeLoadException at memory location 0x11BFD8C4.

Every time this line is executed (see line 97 of this sample file):

using (IMemoryBufferReference reference = buffer.CreateReference())

What is the cause of the EETypeLoadException and do I need to worry about this?


Edit

Steps to reproduce:

  1. Download Windows-universal-samples
  2. Open the Windows-universal-samples\Samples\AudioCreation\cs\AudioCreation.sln solution
  3. Open AudioCreation project properties > Debug > Set debugger types to "Mixed (Managed and Native)
  4. Run the app in debug mode
  5. Click on option 3 "Using a FrameInputNode"
  6. Click on the "Generate Audio" button
  7. Look in the Output > Debug window, where I'm getting the EETypeLoadExceptions

I'm using Visual Studio Enterprise 2015, Update 3

Upvotes: 2

Views: 545

Answers (1)

Franklin Chen - MSFT
Franklin Chen - MSFT

Reputation: 4923

What is the cause of the EETypeLoadException and do I need to worry about this?

This is a known issue, the EETypeLoadException will be thrown when trying to call AudioBuffer.CreateReference and assign to a variable:

using (AudioBuffer buffer = frame.LockBuffer(AudioBufferAccessMode.Write))
using (IMemoryBufferReference reference = buffer.CreateReference()) //Here
{
}

It's trying to load type information for the class that CreateReference returns but cannot find it.

In UWP apps, you can ignore this exception especially in Mixed debug mode. In Desktop application, like WPF, we may add a CAST to avoid such exception.

Upvotes: 3

Related Questions