Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

MFXEnumImplementations exceptions.

RobinsonUK
New Contributor I
2,330 Views

I have started to get exceptions from Vpl in my codebase, so I made a minimal repro to see if I still got them there, and I do.

 

I have an Intel Arc 380 and all my drivers are up to date (support assistant reports 31.0.101.4900).  I'm on Windows 11 (also up to date) and have a 3900X.  I am driving my monitor from an NVIDIA 3060, so using the Arc headless.  I am developing with Visual Studio 2022 17.7.3.

 

The code is as follows:

 

 

 

#include "vpl/mfx.h"

#include <stdio.h>

#pragma comment(lib, "vpl.lib")

int main() {
    mfxLoader loader = MFXLoad();
    if (!loader) {
        fprintf(stderr, "Failed to create a loader\n");
        return -1;
    }

    mfxU32 i = 0;

    mfxImplDescription* desc = nullptr;

    while (MFX_ERR_NONE == MFXEnumImplementations(loader, i, MFX_IMPLCAPS_IMPLDESCSTRUCTURE, reinterpret_cast<mfxHDL*>(&desc))) {
        if (desc->Impl == MFX_IMPL_HARDWARE || desc->Impl == MFX_IMPL_HARDWARE2 || desc->Impl == MFX_IMPL_HARDWARE3 || desc->Impl == MFX_IMPL_HARDWARE4) {
            printf("Implementation %d: %s\n", i, desc->ImplName);
        }

        MFXDispReleaseImplDescription(loader, desc);
        i++;
    }

    MFXUnload(loader);
    return 0;
}

 

 

 

Basic idea here is to just enumerate implementations and print out when we see a hardware impl.  The code succeeds and finds a hardware impl after I have clicked through all of the following exceptions.  Please advice on how to get rid of them or even what they mean.  I don't like simply hiding them.  If there's a problem, I need to understand it.

 

Fyi, the impl is reported as follows in hello_encode (also has the same issue):

 

C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch_d.inf_amd64_196b0afe45f328b8\libmfx64-gen.dl

 

 

Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FE020.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FE020.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FDF40.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FE020.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: mfxStatus at memory location 0x000000808A8FE020.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: MONZA::IgcThreadingContext<MONZA::AdapterTraits_Gen12HP>::msg_end at memory location 0x000000808ACFFB50.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: MONZA::IgcThreadingContext<MONZA::AdapterTraits_Gen12HP>::msg_end at memory location 0x000000808ACFF8E0.
Exception thrown at 0x00007FFFAF134FFC in enumerate.exe: Microsoft C++ exception: MONZA::IgcThreadingContext<MONZA::AdapterTraits_Gen12HP>::msg_end at memory location 0x000000808BCFFDA0.

 

 

 

The call stack at the first exception is:

 

 

 

 	KernelBase.dll!00007fffaf134ffc()	Unknown
 	libmfx64-gen.dll!00007fff495a7d90()	Unknown
 	libmfx64-gen.dll!00007fff4919cf86()	Unknown
 	libmfx64-gen.dll!00007fff4919ca55()	Unknown
 	libmfx64-gen.dll!00007fff4919cb18()	Unknown
 	libmfx64-gen.dll!00007fff491f0bf2()	Unknown
 	libmfx64-gen.dll!00007fff490b22d3()	Unknown
 	libmfx64-gen.dll!00007fff490b1353()	Unknown
 	libmfx64-gen.dll!00007fff490b1824()	Unknown
 	libmfx64-gen.dll!00007fff490d8c1a()	Unknown
 	libmfx64-gen.dll!00007fff48ff4f82()	Unknown
 	libmfx64-gen.dll!00007fff48dd3018()	Unknown
 	libmfx64-gen.dll!00007fff48db89ae()	Unknown
 	libmfx64-gen.dll!00007fff48dbca3c()	Unknown
 	libmfx64-gen.dll!00007fff48dbb45f()	Unknown
 	libvpl.dll!00007fff6830d0cf()	Unknown
 	libvpl.dll!00007fff6830b144()	Unknown
 	libvpl.dll!00007fff68302b6f()	Unknown
>	enumerate.exe!main() Line 19	C++
 	enumerate.exe!invoke_main() Line 79	C++
 	enumerate.exe!__scrt_common_main_seh() Line 288	C++
 	enumerate.exe!__scrt_common_main() Line 331	C++
 	enumerate.exe!mainCRTStartup(void * __formal) Line 17	C++
 	kernel32.dll!00007fffb0db257d()	Unknown
 	ntdll.dll!00007fffb1aeaa78()	Unknown

 

 

  

0 Kudos
9 Replies
RobinsonUK
New Contributor I
2,310 Views

Some additional info.  When I'm encoding I'm also getting a constant stream of first chance exceptions in the output, drowning out any other debug output I'm tracing.  The encoding appears to be working regardless.  Obviously I don't have the libmfx64-gen.dll pdb, so I can't see what its complaint is.  It's pretty severe.  I guess there's a problem in the driver. 

 

 

 

 

 

Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF73FF4C0.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF73FF4C0.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF72FF880.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF73FF4C0.
Exception thrown at 0x00007FFE1B344FFC in hello encode.exe: Microsoft C++ exception: mfxStatus at memory location 0x0000008EF71FF330.

 

 

 

0 Kudos
RobinsonUK
New Contributor I
2,235 Views

Any update on what could be causing this?   I can disable the exception but I'd like to know why it's happening.  I have to explain it to others who build and run my code.

 

Thanks.

0 Kudos
ThasneemV_Intel
Moderator
2,232 Views

Hi,


Thanks for posting in Intel Communities.


We are working on triaging your issue. We shall get back to you soon with an update.


Regards,

Thasneem Vazim


0 Kudos
RobinsonUK
New Contributor I
2,122 Views

Just an additional note.  I moved development to my work laptop (AMD CPU/nVidia GPU), with remote debugging to my Coffee Lake test PC (Intel CPU/nVidia GPU) and I still get these exceptions.  So I don't think it's ARC specific.  I have other problems with 1.35 and VPL I will probably write a post about later.

 

 

 

0 Kudos
Pamela_H_Intel
Moderator
2,109 Views

Thank you for the update. It's good to remove as many variables as possible.


So, we have a few separate VPL SW Dev teams. I just spoke with the VPL Dispatch team and they don't recognize anything in the Exception. That's not to say VPL isn't the cause. But that is where I started.


The one thing that is completely unfamiliar is MONZA. None of us have seen that. Is that an application you are using? (The only thing I see online is that it is a province in Italy :))


0 Kudos
RobinsonUK
New Contributor I
2,101 Views

I have no idea what it is either.  I also went down the Google It route.  I saw something MONZA-related on Stack Overflow - a Qt and OpenCV project.   I don't use Qt or OpenCV.  I assumed it was something to do with the Arc as I do not get these exceptions othewise.  

Please note the callstack.  If they have pdb file or a map file, they may be able to see where it happens and deduce what's failing.

 

Note that my Coffeelake (1.35) box is not doing this at the moment (I get a single shadercache exception but can continue through it), mostly because it's generally failing with VPL; a problem with which I will further irritate your devs shortly.

0 Kudos
ThasneemV_Intel
Moderator
1,941 Views

Hi,


We have informed the team concerned regarding your issue and we are working on it internally. Could you please let us know regarding the oneVPL version you are using?


Regards,

Thasneem Vazim


0 Kudos
RobinsonUK
New Contributor I
1,921 Views

Hi Thasneem, sorry for late reply.

 

I am linking with vpl.lib in onevpl.devel.win-x64.2023.1.0.43419\lib\native\win-x64\x86.  So that would be 2023.1.0.43419 of the SDK.  My Intel Arc reports version 2.1.258 with ApiVersion 2.9.131081.

 

  Name Value Type

Version{Minor=2 '\x2' Major=1 '\x1' Version=258 }mfxStructVersion
 ImplMFX_IMPL_TYPE_HARDWARE (2)mfxImplType
 AccelerationModeMFX_ACCEL_MODE_VIA_D3D11 (768)mfxAccelerationMode
ApiVersion{Minor=9 Major=2 Version=131081 }mfxVersion
ImplName0x00000257a3115fd8 "mfx-gen"char[32]
License0x00000257a3115ff8 "Intel End User License Agreement for Developer Tools (Version October 2021)"char[128]

 

From Visual Studio 2022, the above is the mfxImplDescription.  I plugged the Arc 380 in again the day before yesterday and updated drivers.  It also did a firmware update of the card.  Perhaps that is a variable I shouldn't have changed but I still get these exceptions.

 

0 Kudos
ThasneemV_Intel
Moderator
1,863 Views

Hi,


Thank you for sharing the details. We are checking on this internally.


Regards,

Thasneem vazim




0 Kudos
Reply