DotNetClasses icon indicating copy to clipboard operation
DotNetClasses copied to clipboard

Fix premature cleanup in code coverage with multiple IsMain processes

Open gusbro opened this issue 9 months ago • 1 comments

  • There are some scenarios where a single process executes GeneXus objects which end up with IsMain being true For example, some GXTest/GXFlow code instantiates procedures without passing them a GxContext. This was making the coverage trace file to try a premature cleanup and the need to start another coverage session
  • Add a specific Id for .NET code coverage sessions (Id=3)
  • Add a public static OnExit entry to allow for third party code which instantiates objects that end up being marked as Main in the same process to do a proper cleanup before exiting the last object.
  • Update OnExit/1 to be more resilient by ensuring every DbgItem with ticks not set to have a valid tick count
  • Add (conditionally compiled) code to generate a verbose log file of the trace being written. To enable this trace you have to build GxClasses.dll with _LOG_WRITER symbol defined

Issue: 202777

gusbro avatar Feb 25 '25 16:02 gusbro

Cherry pick to beta success
  • 7609191b
  • eb624ae5

genexusbot avatar Feb 25 '25 16:02 genexusbot