You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var tcs = new TaskCompletionSource<string>();
PoseContext.Isolate(() =>
{
Debug.WriteLine("Starting test");
/* Running in a separate task causes stack overflow */
_ = Task.Run(() =>
{
Debug.WriteLine("In different task");
});
/**********/
Debug.WriteLine("Test Complete.");
tcs.SetResult("Complete");
}, consoleShim);
await tcs.Task;`
I get the following stack overflow error: Stack overflow. at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Int32) at System.Collections.Generic.Dictionary2[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Reflection.Emit.Label, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryInsert(Int32, System.Reflection.Emit.Label, System.Collections.Generic.InsertionBehavior)
at Pose.Extensions.DictionaryExtensions.TryAdd[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Reflection.Emit.Label, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.Dictionary2<Int32,System.Reflection.Emit.Label>, Int32, System.Reflection.Emit.Label) at Pose.IL.MethodRewriter.Rewrite() at DynamicClass.stub_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, Int32, Int32, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String) at DynamicClass.stub_virt_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.SR_InternalGetResourceString(System.String) at DynamicClass.stub_System.SR_InternalGetResourceString(System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.SR_GetResourceString(System.String) at DynamicClass.stub_System.SR_GetResourceString(System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.stub_System.SR_get_Arg_InvalidOperationException(System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.InvalidOperationException_.ctor(System.InvalidOperationException) at DynamicClass.stub_ctor_System.InvalidOperationException_.ctor(System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Runtime.CompilerServices.RuntimeHelpers_IsBitwiseEquatable() at DynamicClass.stub_System.Runtime.CompilerServices.RuntimeHelpers_IsBitwiseEquatable(System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Array_LastIndexOf(System.String[], System.String, Int32, Int32) at DynamicClass.stub_System.Array_LastIndexOf(System.String[], System.String, Int32, Int32, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, Int32, Int32) at DynamicClass.stub_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, Int32, Int32, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String) at DynamicClass.stub_virt_System.Collections.Generic.List1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.SR_InternalGetResourceString(System.String)...
The text was updated successfully, but these errors were encountered:
When trying to replace a function call within a task started by PoseContext.Isolate...
`
Shim consoleShim = Shim.Replace(() => Debug.WriteLine(Is.A())).With(
delegate (string s) { Debug.WriteLine($"Hijacked: {s}"); });
I get the following stack overflow error:
Stack overflow. at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Int32) at System.Collections.Generic.Dictionary
2[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Reflection.Emit.Label, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryInsert(Int32, System.Reflection.Emit.Label, System.Collections.Generic.InsertionBehavior)at Pose.Extensions.DictionaryExtensions.TryAdd[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Reflection.Emit.Label, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.Dictionary
2<Int32,System.Reflection.Emit.Label>, Int32, System.Reflection.Emit.Label) at Pose.IL.MethodRewriter.Rewrite() at DynamicClass.stub_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, Int32, Int32, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String) at DynamicClass.stub_virt_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.SR_InternalGetResourceString(System.String) at DynamicClass.stub_System.SR_InternalGetResourceString(System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.SR_GetResourceString(System.String) at DynamicClass.stub_System.SR_GetResourceString(System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.stub_System.SR_get_Arg_InvalidOperationException(System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.InvalidOperationException_.ctor(System.InvalidOperationException) at DynamicClass.stub_ctor_System.InvalidOperationException_.ctor(System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Runtime.CompilerServices.RuntimeHelpers_IsBitwiseEquatable() at DynamicClass.stub_System.Runtime.CompilerServices.RuntimeHelpers_IsBitwiseEquatable(System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Array_LastIndexOf(System.String[], System.String, Int32, Int32) at DynamicClass.stub_System.Array_LastIndexOf(System.String[], System.String, Int32, Int32, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, Int32, Int32) at DynamicClass.stub_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, Int32, Int32, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String) at DynamicClass.stub_virt_System.Collections.Generic.List
1[System.String]_LastIndexOf(System.Collections.Generic.List1<System.String>, System.String, System.RuntimeMethodHandle, System.RuntimeTypeHandle) at DynamicClass.dynamic_System.SR_InternalGetResourceString(System.String)...
The text was updated successfully, but these errors were encountered: