Plugin Version or Commit ID
v0.16.2
Unity Version
6000.3.9f1
Your Host OS
windows 11
Target Platform
Windows Standalone
[Windows Only] Visual Studio C++ and Windows SDK Version
No response
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
No response
Command Sequences
import a unity package that has a older msvcp140 as dependency or copy the older msvcp140 to you unity's plugins folder and make a build. In this case , the dll in question is version 14.29.30040.0 (June 2021). It came with a package that is quite old.
Log
Mono path[0] = 'D:/_Library/Documents/UnityProjects/u_FeceRecognition/Build/2/u_FeceRecognition_Data/Managed'
Mono config path = 'D:/_Library/Documents/UnityProjects/u_FeceRecognition/Build/2/MonoBleedingEdge/etc'
Input System module state changed to: Initialized.
[Physics::Module] Initialized fallback backend.
[Physics::Module] Id: 0xdecafbad
Initialize engine version: 6000.3.9f1 (7a9955a4f2fa)
[Subsystems] Discovering subsystems at path D:/_Library/Documents/UnityProjects/u_FeceRecognition/Build/2/u_FeceRecognition_Data/UnitySubsystems
[D3D12 Device Filter] Vendor Name: NVIDIA
[D3D12 Device Filter] Device Name: NVIDIA GeForce RTX 2070 SUPER
[D3D12 Device Filter] Driver Version: 32.0.15.9571
[D3D12 Device Filter] Feature Level: 12.2
[D3D12 Device Filter] Graphics Memory: 7989 MB
[D3D12 Device Filter] Processor Count: 12
[D3D12 Device Filter] Device Type: Discrete
GfxDevice: creating device client; kGfxThreadingModeSplitJobs
d3d12: failed to query info queue interface (0x80004002).
Direct3D:
Version: Direct3D 12 [level 12.2]
Renderer: NVIDIA GeForce RTX 2070 SUPER (ID=0x1e84)
Vendor: NVIDIA
VRAM: 7989 MB
App VRAM Budget: 7221 MB
Driver: 32.0.15.9571
Begin MonoManager ReloadAssembly
- Loaded All Assemblies, in 0.162 seconds
- Finished resetting the current domain, in 0.003 seconds
[Physics::Module] Selected backend.
[Physics::Module] Name: PhysX
[Physics::Module] Id: 0xf2b8ea05
[Physics::Module] SDK Version: 4.1.2
[Physics::Module] Integration Version: 1.0.0
[Physics::Module] Threading Mode: Multi-Threaded
<RI> Initializing input.
Using Windows.Gaming.Input
UnloadTime: 0.578000 ms
Initializing the Bootstrap GameObject
The configuration for the sample app can be modified using AppSettings.asset.
Logging for the MediaPipeUnityPlugin will be suppressed. To enable logging, please check the 'Development Build' option and build.
DllNotFoundException: mediapipe_c assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Mediapipe.UnsafeNativeMethods.mp_api__SetFreeHGlobal(Mediapipe.UnsafeNativeMethods/FreeHGlobalDelegate)
at Mediapipe.UnsafeNativeMethods..cctor () [0x00000] in <359d57b231f1478e879a5074e7dd2683>:0
Rethrow as TypeInitializationException: The type initializer for 'Mediapipe.UnsafeNativeMethods' threw an exception.
at Mediapipe.Protobuf.SetLogHandler (Mediapipe.Protobuf+LogHandler logHandler) [0x00000] in <359d57b231f1478e879a5074e7dd2683>:0
at Mediapipe.Unity.Sample.Bootstrap+<Init>d__11.MoveNext () [0x00045] in <a61969f84070461289783d5cdc3fc57c>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <3fb3967d3088448f8ca8e17d261beb54>:0
UnityEngine.MonoBehaviour:StartCoroutineManaged2_Injected(IntPtr, IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Mediapipe.Unity.Sample.Bootstrap:OnEnable()
UnityEngine.Object:Internal_CloneSingle_Injected(IntPtr)
UnityEngine.Object:Internal_CloneSingle(Object)
UnityEngine.Object:Instantiate(GameObject)
Mediapipe.Unity.Sample.BaseRunner:FindBootstrap()
Mediapipe.Unity.Sample.<Start>d__7:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
DllNotFoundException: mediapipe_c assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Mediapipe.UnsafeNativeMethods.mp_api__SetFreeHGlobal(Mediapipe.UnsafeNativeMethods/FreeHGlobalDelegate)
at Mediapipe.UnsafeNativeMethods..cctor () [0x00000] in <359d57b231f1478e879a5074e7dd2683>:0
Rethrow as TypeInitializationException: The type initializer for 'Mediapipe.UnsafeNativeMethods' threw an exception.
at Mediapipe.Protobuf.ResetLogHandler () [0x00000] in <359d57b231f1478e879a5074e7dd2683>:0
at Mediapipe.Unity.Sample.Bootstrap.OnApplicationQuit () [0x00012] in <a61969f84070461289783d5cdc3fc57c>:0
[Physics::Module] Cleanup current backend.
[Physics::Module] Id: 0xf2b8ea05
Input System module state changed to: ShutdownInProgress.
Input System polling thread exited.
Input System module state changed to: Shutdown.
Additional Context
Difficulties Faced 🚨
- As this package does not bring the
msvcp140 inside a unity project, it is near impossible to find the correlation of mediapipe_c.dll and the dll specified.
- There is no clear error message from either mediapipe library or unity to detect the cause of the issue, the solutions just does not work and dumps the log message as shared above.
- Log presents a different dll (
mediapipe_c.dll) than the dll that is causing the issue.
- The issue occurs in the Release build.
- There is no obvious visible way to relate this issue with
msvcp140. I found it as a error issue in Windows Event Viewer ! .
Things to note and Possible Work Around
- ⚠️ The issue will not present itself in the Development build
- ⚠️ This dll doesnot cause any issue while running in the editor playmode.
- ✅ removing / replacing the dll ((copy from your system and paste)) in the editor before build with a latest one, fully works in the build.
- ✅ manually copying / replacing dll with newwer version in the build directory also resolves the issue.
Plugin Version or Commit ID
v0.16.2
Unity Version
6000.3.9f1
Your Host OS
windows 11
Target Platform
Windows Standalone
[Windows Only] Visual Studio C++ and Windows SDK Version
No response
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
No response
Command Sequences
import a unity package that has a older
msvcp140as dependency or copy the older msvcp140 to you unity's plugins folder and make a build. In this case , the dll in question is version14.29.30040.0 (June 2021). It came with a package that is quite old.Log
Additional Context
Difficulties Faced 🚨
msvcp140inside a unity project, it is near impossible to find the correlation ofmediapipe_c.dlland the dll specified.mediapipe_c.dll) than the dll that is causing the issue.msvcp140. I found it as a error issue inWindows Event Viewer! .Things to note and Possible Work Around