NotSupportedException on InvokeIfOutputStreamFound
See original GitHub issuePlugin Version or Commit ID
v0.10.0
Unity Version
2021.3.4f
Your Host OS
Windows 10 Pro / Mac OS
Target Platform
iOS
Description
Suddenly I got this error message when I play the app.
NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition. The method we're attempting to marshal is: Mediapipe.Unity.OutputStream`2[[Mediapipe.NormalizedLandmarkListPacket, Mediapipe.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[Mediapipe.NormalizedLandmarkList, Mediapipe.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::InvokeIfOutputStreamFound
at Mediapipe.UnsafeNativeMethods.mp_CalculatorGraph__ObserveOutputStream__PKc_PF_b (System.IntPtr graph, System.String streamName, System.Int32 streamId, Mediapipe.CalculatorGraph+NativePacketCallback packetCallback, System.Boolean observeTimestampBounds, System.IntPtr& status) [0x00000] in <00000000000000000000000000000000>:0
at Mediapipe.CalculatorGraph.ObserveOutputStream (System.String streamName, System.Int32 streamId, Mediapipe.CalculatorGraph+NativePacketCallback nativePacketCallback, System.Boolean observeTimestampBounds) [0x00000] in <00000000000000000000000000000000>:0
at Mediapipe.Unity.OutputStream`2[TPacket,TValue].AddListener (System.EventHandler`1[TEventArgs] callback) [0x00000] in <00000000000000000000000000000000>:0
at Mediapipe.Unity.Holistic.MySolution.OnStartRun () [0x00000] in <00000000000000000000000000000000>:0
at Mediapipe.Unity.Holistic.MySolution+<Run>d__26.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
And this is the definition of InvokeIfOutputStreamFound
of OutputStream.cs file (Nothing changed to your code)
[AOT.MonoPInvokeCallback(typeof(CalculatorGraph.NativePacketCallback))]
protected static Status.StatusArgs InvokeIfOutputStreamFound(IntPtr graphPtr, int streamId, IntPtr packetPtr)
{
try
{
I can’t get the idea, so could you tell me something suspicious about it?
Code to Reproduce the issue
No response
Additional Context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
NotSupportedException Class (System)
NotSupportedException indicates that no implementation exists for an invoked method or property. NotSupportedException uses the HRESULT COR_E_NOTSUPPORTED, ...
Read more >c# - Read text file return 'System.NotSupportedException' ...
The issue is that there is an invisible character in your string. I don't know how they get there, others have guessed that...
Read more >NotSupportedException on InvokeIfOutputStreamFound
Suddenly I got this error message when I play the app. NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' ......
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
I have the same problem. Setting IL2CPP code generation to
Faster (smaller) builds
makes this issue.Did you remove the cache (e.g.
Library/
) before starting UnityEditor?