Daily Usage Issues

Code Coverage Markers Misaligned

Started by stevehjohn on 14,398 views

Remco wrote:
chonuff wrote:
If you have any luck in identifying what is special about these files and why it only happens for them, I'd really like to know. If I can reproduce the issue, maybe I can fix it for good :)

It's suspicious the way this has suddenly come up with a VS update. I wonder if it might be an internal issue inside VS itself. In which case it may even disappear on its own.


I did notice that it's seems to only happen with short files (one is 11 lines, another is 39). Is it possible that the marker locations are able to fully process before CodeLens pushes the lines down for shorter files? Below are the contents of the shorter file (for the most part):


using System.Collections.Generic;

namespace Test.NCrunch
{
    public class SimpleObject
    {
        public AnotherObject ChildObject { get; set; }
        public IEnumerable<ListObject1> SomeList { get; set; }
        public IEnumerable<ListObject2> AnotherList { get; set; }
    }
}


I hope this helps.
I just wanted to confirm that I've now managed to reproduce this problem, and a fix for it will be shipping with the next release of NCrunch.

The problem was exactly as you suggested: It's a race condition caused by CodeLens. The reconstruction of the view by CodeLens causes the view to change without the markers being realigned. Some code files are affected more than others .. that's the nature of race conditions I guess.

Thanks for your help with reporting this one and narrowing it down.

Post a reply

Log in to reply.