DllNotFoundException: mediapipe_c | NullReferenceException: Object reference not set to an instance of an object
See original GitHub issueSystem information
- OS Platform and Distribution (e.g., Linux Ubuntu 20.04, WSL2): Windows
- Target (e.g. desktop cpu, android arm64): desktop cpu
- Bazel version: 4.1.0
- Python version: 3.7.8
- GCC/G++ version: 19.16.27045 for x64
- Unity version: 2020
- Android NDK version (if building for Android):
- Xcode version (if building for iOS):
Describe the problem Plugins: Failed to load ‘C:/Users/arham/Documents/extras/MediaPipeUnityPlugin/Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dll’ because one or more of its dependencies could not be loaded.
Steps to reproduce the issue I tried to open in editor by clicking over DemoDesktop scene. Also tried to import it as package, Even I also reinstalled the Unity 2020.
Full logs
Plugins: Failed to load 'C:/Users/arham/Documents/extras/MediaPipeUnityPlugin/Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dll' because one or more of its dependencies could not be loaded.
DllNotFoundException: mediapipe_c
Mediapipe.ResourceManager..ctor () (at Packages/com.github.homuler.mediapipe/Runtime/Scripts/Util/ResourceManager.cs:20)
Mediapipe.LocalAssetManager..ctor () (at <e2b237ecb26f4097b4aa4033f48ffa11>:0)
LocalAssetLoader.Start () (at Assets/Mediapipe/Samples/Scripts/ResourceManager/LocalAssetLoader.cs:5)
NullReferenceException: Object reference not set to an instance of an object
LocalAssetLoader.PrepareAsset (System.String name, System.String uniqueKey, System.Boolean overwrite) (at Assets/Mediapipe/Samples/Scripts/ResourceManager/LocalAssetLoader.cs:9)
DemoGraph.PrepareDependentAsset (System.String assetName, System.String uniqueKey, System.Boolean overwrite) (at Assets/Mediapipe/Samples/Scripts/DemoGraph.cs:192)
DemoGraph.PrepareDependentAsset (System.String assetName, System.Boolean overwrite) (at Assets/Mediapipe/Samples/Scripts/DemoGraph.cs:196)
FaceDetectionGraph.PrepareDependentAssets () (at Assets/Mediapipe/Samples/Graphs/FaceDetection/Scripts/FaceDetectionGraph.cs:57)
DemoGraph.Initialize () (at Assets/Mediapipe/Samples/Scripts/DemoGraph.cs:46)
SceneDirector+<RunGraph>d__23.MoveNext () (at Assets/Mediapipe/Samples/Scripts/SceneDirector.cs:171)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e414e10bfe5f45729ff122f3359de21b>:0)
Additional context Even I ignore this DLL error and run the scene but it is producing following error:
NullReferenceException: Object reference not set to an instance of an object
LocalAssetLoader.PrepareAsset (System.String name, System.String uniqueKey, System.Boolean overwrite) (at Assets/Mediapipe/Samples/Scripts/ResourceManager/LocalAssetLoader.cs:9)
DemoGraph.PrepareDependentAsset (System.String assetName, System.String uniqueKey, System.Boolean overwrite) (at Assets/Mediapipe/Samples/Scripts/DemoGraph.cs:192)
DemoGraph.PrepareDependentAsset (System.String assetName, System.Boolean overwrite) (at Assets/Mediapipe/Samples/Scripts/DemoGraph.cs:196)
FaceDetectionGraph.PrepareDependentAssets () (at Assets/Mediapipe/Samples/Graphs/FaceDetection/Scripts/FaceDetectionGraph.cs:57)
DemoGraph.Initialize () (at Assets/Mediapipe/Samples/Scripts/DemoGraph.cs:46)
SceneDirector+<RunGraph>d__23.MoveNext () (at Assets/Mediapipe/Samples/Scripts/SceneDirector.cs:171)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e414e10bfe5f45729ff122f3359de21b>:0)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Object reference not set to an instance of an object
NullReferenceException : Object reference not set to an instance of an object in line 21 and still can't understand why.
Read more >Failed to load libmediapipe_c.dll · Issue #186
I'm not sure what you mean, but this project is independent of ... NullReferenceException: Object reference not set to an instance of an ......
Read more >Object reference not set to an instance of an object.
the error indicates an object is null. Either strSearch is null or the result of strSearch.Trim() is null. To check, use Graphain's answer...
Read more >Object reference not set to the instance of an object - Unity
This is an error message that plagues many newcomers to unity, and so I thought I would make a short tutorial dressing what...
Read more >NullReferenceException: Object reference not set to an ...
His console only writes one error: "Null ReferenceException: object reference not set to an instance of an object".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It usually occurs when you start Unity before building native libraries (Unity removes
.meta
files). cf. https://github.com/homuler/MediaPipeUnityPlugin/issues/186#issuecomment-851253589On Windows, please just ignore this error if it works. It seems that
libmediapipe_c.dll
must be loaded after OpenCV but we cannot specify the order.Thanks @homuler it worked, In my case I was using
OpenCV 3.4.15
So my DLL file wasopencv_world3415.dll
but the meta file wasopencv_world3410.dll.meta
, So instead of changing my OpenCV version I try to rename meta asopencv_world3415.dll.meta
and it worked! Also don’t forget to enable “Load on startup” for opencv DLL file.