Completed
Last Updated: 22 Jun 2022 13:45 by ADMIN
Ivo
Created on: 27 Jan 2022 12:45
Type: Bug Report
1
Enabling profiler through JustMock extension causes unexpected stack overflow

The case is reproducible (but might not be limited to) in a dedicated environment including Windows 10, JustMock R3.2021, Visual Studio 2019 and .NET 5. When the profiler is enabled the Visual Studio has problems with the test discovery and reports "Stack overflow" exception. The same applies to building solutions with Azure Function project.

CLR Stack from memory dump captured upon test execution:

000000CD7CE038D0 00007ffafb22d3b6 [GCFrame: 000000cd7ce038d0]
000000CD7CE03A40 00007ffafb22d3b6 [GCFrame: 000000cd7ce03a40]
000000CD7CE0A530 00007ffafb22d3b6 [PrestubMethodFrame: 000000cd7ce0a530] System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(System.Reflection.RuntimeAssembly, System.String)
000000CD7CE0A988 00007ffafb22d3b6 [GCFrame: 000000cd7ce0a988]
000000CD7CE0E3C0 00007ffafb22d3b6 [PrestubMethodFrame: 000000cd7ce0e3c0]  System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(System.Reflection.RuntimeAssembly, System.String)

... (omitted for brevity)

000000CD7CF72548 00007ffafb22d3b6 [GCFrame: 000000cd7cf72548]
000000CD7CF75F80 00007ffafb22d3b6 [PrestubMethodFrame: 000000cd7cf75f80] System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(System.Reflection.RuntimeAssembly, System.String)
000000CD7CF763D8 00007ffafb22d3b6 [GCFrame: 000000cd7cf763d8]
000000CD7CF79E10 00007ffafb22d3b6 [PrestubMethodFrame: 000000cd7cf79e10] System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(System.Reflection.RuntimeAssembly, System.String)
000000CD7CF7A268 00007ffafb22d3b6 [GCFrame: 000000cd7cf7a268]
000000CD7CF7DCA0 00007ffafb22d3b6 [PrestubMethodFrame: 000000cd7cf7dca0] System.Collections.Generic.Dictionary`2[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]]..ctor()
000000CD7CF7DF10 00007FFA9B787B2A System.AppContext..cctor() [/_/src/System.Private.CoreLib/shared/System/AppContext.cs @ 16]
000000CD7CF7E340 00007ffafb2b6c93 [GCFrame: 000000cd7cf7e340]
000000CD7CF7ED18 00007ffafb2b6c93 [HelperMethodFrame: 000000cd7cf7ed18]
000000CD7CF7EE20 00007FFA9B7876B9 System.AppContext.Setup(Char**, Char**, Int32)

 

2 comments
ADMIN
Mihail
Posted on: 22 Jun 2022 13:45

The issue was resolved and the fix is now available with R2 SP1 2022 version 2022.2.621.1.

 

Regards,
Mihail
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Ivo
Posted on: 27 Jan 2022 13:07

Hello All,

The issue has a known workaround, please follow the steps below:

  • Disable JustMock extension inside Visual Studio
  • Download and extract the attached file in your project at solution level
  • Configure your tests to use runsetttings as shown in the picture

Regards,
Ivo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Attached Files: