Strange red blocks in Editor window




















  1. #1


    Strange red blocks in Editor window

    Does anyone know what these strange red blocks mean on my scroll bar (in VS2019) ?

    They aren’t related to the source lines – ie if I scroll the text window, the blocks remain in the same positions; they don’t move as I scroll. And I only ever see them if I load one particular source file – even if it’s unedited and even if I close that file and re-open it…

    Name: Capture-19.jpg Views: 51 Size: 26.2 KB

    “A problem well stated is a problem half solved.” – Charles F. Kettering





  2. #2


    Re: Strange red blocks in Editor window

    They show you the places (the lines) where intellisense has found the errors.
    Note that sometimes it sucks!
    You can switch to show only the build errors though.

    Victor Nijegorodov





  3. #3


    Re: Strange red blocks in Editor window

    Additional info: https://developercommunity.visualstu…compile/341025

    Victor Nijegorodov





  4. #4


    Re: Strange red blocks in Editor window

    Thanks Victor – I followed a few links and found some advice about finding the project’s .vs folder and deleting the .suo file. Then there were other suggestions about deleting everything there except for the .suo file. But neither of them helped.

    Eventually I discovered that this particular source file has got its own .ipch file. I’ve no idea why – because the project must have well over 1,000 source files but only about 4 of them have their own .ipch file. Anyway – deleting the .ipch file has fixed the problem

    “A problem well stated is a problem half solved.” – Charles F. Kettering





  5. #5


    Re: Strange red blocks in Editor window

    Glad you’ve solved this problem!

    Victor Nijegorodov





  6. #6


    Re: Strange red blocks in Editor window

    What I seem to get now (with some files) is gray blocks rather than the red ones. I suppose maybe they’d indicate warnings, rather than errors… But what’s weird is that if I compile just that particular file, it doesn’t give me any warnings, or errors or even messages – just the gray blocks for some reason

    “A problem well stated is a problem half solved.” – Charles F. Kettering





  7. #7


    Re: Strange red blocks in Editor window

    Yes, there are some “low level important” warnings like not initialized arrays, suggestions to use constexpr instead of #define and so on…

    Victor Nijegorodov





  8. #8


    Re: Strange red blocks in Editor window

    Have you tried installing the Intellisense Extender as an extension? It provides additional info re potential code issues.

    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only – not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgment. Also note that I only provide advice and guidance via the forums – and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.2.2)





  9. #9


    Re: Strange red blocks in Editor window

    Quote Originally Posted by 2kaud
    View Post

    Have you tried installing the Intellisense Extender as an extension? It provides additional info re potential code issues.

    I didn’t.

    Victor Nijegorodov






  10. Re: Strange red blocks in Editor window

    Me neither. What’s weird is that the blocks don’t seem to correspond to specific lines. So if I scroll the Editor window, the blocks remain in their initial positions. And even if I close the project then delete the .ipch file, then re-open and re-compile, the blocks come back in the same positions (even though the Editor window is now showing different text).

    “A problem well stated is a problem half solved.” – Charles F. Kettering






  11. Re: Strange red blocks in Editor window

    Quote Originally Posted by John E
    View Post

    Me neither. What’s weird is that the blocks don’t seem to correspond to specific lines. So if I scroll the Editor window, the blocks remain in their initial positions. And even if I close the project then delete the .ipch file, then re-open and re-compile, the blocks come back in the same positions (even though the Editor window is now showing different text).

    I agree, it’s not so easy to find out where exactly the problem is.
    You have to find such a gray dashed underline:

    Name: Gray Blocks.jpg Views: 6 Size: 14.3 KB
    and see its tooltip.

    Victor Nijegorodov






  12. Re: Strange red blocks in Editor window

    Wow – well spotted! For the most part, my messages (mostly with red lines) are saying incomplete type is not allowed

    And yet these don’t seem to be programming errors AFAICT. They’re statements which are annoying intellisense for some reason.

    In fact, the vast majority of c’tors and d’tors give me the above error – but only in the affected source files which are just a tiny number of the overall sources.

    “A problem well stated is a problem half solved.” – Charles F. Kettering



















Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
















Click Here to Expand Forum to Full Width













.

Leave a Comment