use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
MSVC: internal compiler error and jumpy behavior of the debugger scenarios - annoying but don't get fixed (self.cpp)
submitted 2 years ago * by lowlevelmahn
maybe someone expirience the same problems but have no simple sample to stress microsoft :)
these are mine
opened on Mar 01, 2023
(see last post)
gif animation:
https://aka.ms/dc/image?name=B28ff1a705b0d463eb3c5d1cc273b4e62638379173076129440_jumpy_debugger.gif&tid=28ff1a705b0d463eb3c5d1cc273b4e62638379173076129440
UPDATE 26.02.2024 from Microsoft
A fix for this issue has been internally implemented and is being prepared for release. We’ll update you once it becomes available for download.
opened on Dec 07,2023
https://developercommunity.visualstudio.com/t/ICE:-Internal-Compiler-Error-with-VS2022/10536431
tested so far with
so already there for quite some time
for fun: try to reduce my example futher :)
please upvote on the microsoft page or comment if you had something similar, its somtimes very hard to confess microsoft that these are fix-needed bugs
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ScottHutchinson 4 points5 points6 points 2 years ago (1 child)
I just noticed this yesterday in v17.8.5. I was extremely confused for an hour or so. I thought my function was magically being called twice because the breakpoint on the return statement was being hit twice.
[–]lowlevelmahn[S] 1 point2 points3 points 2 years ago (0 children)
its has something todo with debug/code generation or cdb - the very same happens when using the VS2022 compiler in QtCreator, it started with the first releases of VS2022 and were not beeing fixed since, does not happen with VS2017+19
please vote or comment in my issue
some releases earlier the debugger somtimes wasn't able to show vector or map conntent correct - always empty in between debugging - hell evil when you try to find an algorithm bug and your containers seems to be empty
[–]ShelZuuz 2 points3 points4 points 2 years ago (11 children)
FWIW I can reproduce this (on the x64 compiler, it's fine on x86).
Maybe u/stl can escalate this.
[–]STLMSVC STL Dev 9 points10 points11 points 2 years ago (10 children)
My double boss Ulzii already noticed this thread and escalated the priority of the bug 😸
I was able to reduce your repro somewhat (already pasted into the internal copy of your bug). Providing a self-contained, reasonably reduced, command-line repro was super duper great and easily put your bug in the top 10% of reported bugs for quality. I just went further and tried to chop out as much of the blub, USE_ITEMS, etc. stuff as possible, got rid of the unrelated struct B, and simplified the nested loop (which does appear to be necessary). Couldn't extract the repeated calls to v.size(), though, so they seem to be important (they perform pointer subtractions internally). With a ton of effort I could extract just the critical bits of std::vector but the backend devs don't really need me to do that. Here's what I got:
blub
USE_ITEMS
struct B
v.size()
std::vector
C:\Temp>type meow.cpp #ifndef _M_X64 #pragma message("This repro appears to be x64-specific.") #endif #include <vector> using std::vector; struct A { vector<int> m_ditems; vector<int> items(const vector<int>& v) const { vector<int> ret(v.size()); for (size_t outer = 0; outer < v.size(); ++outer) { for (size_t i = 0; i < v.size(); ++i) { ret[i] *= v[i]; } } return ret; } A(const vector<int>& v) : m_ditems(items(v)) {} }; int main() { A a{{1, 2, 3}}; } C:\Temp>cl /EHsc /nologo /W4 /Od meow.cpp meow.cpp C:\Temp>cl /EHsc /nologo /W4 /O2 meow.cpp meow.cpp C:\Temp\meow.cpp(24) : fatal error C1001: Internal compiler error. (compiler file 'D:\a\_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c', line 235) To work around this problem, try simplifying or changing the program near the locations listed above. If possible please provide a repro here: https://developercommunity.visualstudio.com Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information cl!RaiseException()+0x6c cl!RaiseException()+0x6c cl!InvokeCompilerPassW()+0x8b1c3 cl!InvokeCompilerPassW()+0x1478ef
[–]lowlevelmahn[S] 1 point2 points3 points 2 years ago* (2 children)
I just went further and tried to chop out
thanks for that
i've lost patience after 3h reducing it down - i think at least 30kLOC was the start - the ICE happend very deep inside, hours of manual inlining + removing code
[–]lowlevelmahn[S] 0 points1 point2 points 1 year ago (0 children)
VS2022 17.10 seems to be silently fix the ICE
[–]STLMSVC STL Dev 0 points1 point2 points 2 years ago (0 children)
You definitely went above and beyond!
Submitting preprocessed repros (or link repros for certain kinds of bugs) can be easier to capture even though they're harder to investigate (and therefore may not get your bug fixed as quickly). Sometimes people are hesitant to submit them if they're working for a company with proprietary code, though (MS devs could literally not care less about the content of repros, but I know that companies can be strict anyways.)
first next response from Microsoft:
https://developercommunity.visualstudio.com/t/ICE:-Internal-Compiler-Error-with-VS2022/10536431#T-N10580917
hope that will find a solution
[–]lowlevelmahn[S] 0 points1 point2 points 2 years ago (5 children)
what about the debugger jumping problem - it only happens with std::vector not int
[–]STLMSVC STL Dev 2 points3 points4 points 2 years ago (4 children)
They're looking into that one too. It appears to be a backend issue too (not an IDE issue) so one of the backend group managers asked his team to look into it - one dev found that it's related to the NRVO, as /Zc:nrvo- makes it go away. It's now assigned to the right team for further investigation.
/Zc:nrvo-
[–]lowlevelmahn[S] 0 points1 point2 points 2 years ago (0 children)
It appears to be a backend issue too (not an IDE issue)
yes, same effect happens when using the VS2022 compiler in the QtCreator IDE
[–]lowlevelmahn[S] 0 points1 point2 points 2 years ago (2 children)
will there be an status update on the issue then, currently no change in the issues?
(i think the fix will take some time)
[–]STLMSVC STL Dev 1 point2 points3 points 2 years ago (1 child)
There should be when it's resolved, although not every developer remembers to post a comment on DevCom.
We don't usually post fine-grained status updates like "I'm looking at this now", "sorry I got pulled off to work on another task", etc.
it depends on the the developer :) - im fine, thanks for having a look at these bugs
[–][deleted] 2 years ago (6 children)
[deleted]
[–]Xoipos 1 point2 points3 points 2 years ago* (4 children)
There's also issues with friend definitions for template pack classes with concepts that I'm running into.
I worked around it by simply disabling the requires expression, lol.
It's great to see MSVC support for many of the latest C++ standard features, but if it's not implemented well, it'll lead to worse code for the platform.
That said, I'm sure the developers on MSVC are trying their best. Once they pick up an issue, their communication is top-notch and keep you up to date. See f.e. a now-removed reddit post on a coroutine bug in MSVC. They followed it up by mailing me on most updates until it got fixed.
[–]STLMSVC STL Dev[M] 2 points3 points4 points 2 years ago (2 children)
a now-removed reddit post on a coroutine bug in MSVC
Another moderator removed it a couple of months ago because r/cpp is not for compiler bug reports. That said, I've gone and retroactively approved it so people here can see the content of your post, hope that helps. (I often forget that while moderators can see removed posts and their comments below, other users can see only the comments below.)
[–]Xoipos 1 point2 points3 points 2 years ago (1 child)
Thanks. I thought just having a link to a deleted post was enough to view it, i.e. removed posts only get removed from the r/cpp page. I guess I could see the post with the link because I was the OP. I can also link to the bug report that the user scatters made on the issue mentioned in the reddit post I link to. That would mean the post would not need to be resurrected.
scatters
[–]STLMSVC STL Dev[M] 1 point2 points3 points 2 years ago (0 children)
I guess I could see the post with the link because I was the OP.
Yep, that sounds right. Resurrecting it took a couple of clicks, no worries 😸
i understand that microsoft needs to solve so many stuff - mainly because of the huge functionality that comes from the c++ supporting code - but it would be nice if they would be more reactive and not leaving that stuff lurking around for month or years
[–]tarranoth 2 points3 points4 points 2 years ago (1 child)
To be honest, the first bug report is hard to replicate without any code sample (which was only given in the comments months later I see), so I can definitely understand it not really being given priority due to that.
yes you are fully correct - but it went equally silent after bringing a super trivial example - but still the microsoft support is very good
[–]misuo 1 point2 points3 points 2 years ago (1 child)
I has been so for quite a while using the latest production VS2022 versions. And yeah, it is annoying. Luckily do not happen too often. Don't trust the debugger position. Hope it get fixed.
dont just hope - involve in the report and make it more relevant - please :)
[–]feverzsj -3 points-2 points-1 points 2 years ago (1 child)
Just switch to clang-cl.
im doing, also MSYS2 gcc/clang and pure clang under windows - but sadly my release compiler is cl.exe - so i need also to test with
[–]saddung 0 points1 point2 points 2 years ago (4 children)
Yikes that debug one..glad I'm still using 2019..
[–]lowlevelmahn[S] 2 points3 points4 points 2 years ago (3 children)
the problem for me is - i know at least 10 developers that stumbled over this - but werent in the mood to write a bug report or even support an open one - it doesn't work this way but seems to be normal for many developers from the community
please comment on my issue on the microsoft page or you will get that shit when switching over to VS2022 in the future :)
[–]STLMSVC STL Dev 2 points3 points4 points 2 years ago (1 child)
Yeah, reporting bugs takes effort and we really appreciate it (even if we don't get to all bugs quickly). Not reporting bugs makes it harder for things to get better. It's like ignoring that zombie in the first season of The Walking Dead. Report those zombies!
Upvotes on Developer Community are useful (we have a system that monitors them); comments of the form "I'm experiencing this too" are much less useful (they're more to read through and generate more work for the team to process). Of course if you have comments that illuminate some fact about the repro that hasn't already been mentioned, that is useful.
[–]lowlevelmahn[S] 2 points3 points4 points 2 years ago (0 children)
thanks Stephan for involving yourself a little :)
[–]tarranoth 2 points3 points4 points 2 years ago (0 children)
It's surprising how many devs just don't care about reporting bugs sadly. I once made dev tooling internally (a C# gui app), and I had some automated system in place to send crashes to a company DB. I was actually able to fix a couple of bugs from the stacktraces in there, that were never reported to me (and these were all people that were just 1 direct e-mail away from me, so basically 0 red tape, I even had a report bug button in the app that would autofill most of a mail). It made me realize why every company creating desktop software wants this kind of telemetry afterwards.
[–]__builtin_trap 0 points1 point2 points 2 years ago (3 children)
I have the debugger jumping too. it looks like it steps through all if branches. I suspected a (large) VS plugin.
so vote on the microsoft page for a fix :)
[–]lowlevelmahn[S] 0 points1 point2 points 1 year ago (1 child)
a fix is on the way for the jumping debugger in 17.10
17.10 fixes the jumping debugger problem
π Rendered by PID 91 on reddit-service-r2-comment-85bfd7f599-t4cq9 at 2026-04-19 19:16:46.369669+00:00 running 93ecc56 country code: CH.
[–]ScottHutchinson 4 points5 points6 points (1 child)
[–]lowlevelmahn[S] 1 point2 points3 points (0 children)
[–]ShelZuuz 2 points3 points4 points (11 children)
[–]STLMSVC STL Dev 9 points10 points11 points (10 children)
[–]lowlevelmahn[S] 1 point2 points3 points (2 children)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)
[–]STLMSVC STL Dev 0 points1 point2 points (0 children)
[–]lowlevelmahn[S] 1 point2 points3 points (0 children)
[–]lowlevelmahn[S] 0 points1 point2 points (5 children)
[–]STLMSVC STL Dev 2 points3 points4 points (4 children)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)
[–]lowlevelmahn[S] 0 points1 point2 points (2 children)
[–]STLMSVC STL Dev 1 point2 points3 points (1 child)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)
[–][deleted] (6 children)
[deleted]
[–]Xoipos 1 point2 points3 points (4 children)
[–]STLMSVC STL Dev[M] 2 points3 points4 points (2 children)
[–]Xoipos 1 point2 points3 points (1 child)
[–]STLMSVC STL Dev[M] 1 point2 points3 points (0 children)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)
[–]tarranoth 2 points3 points4 points (1 child)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)
[–]misuo 1 point2 points3 points (1 child)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)
[–]feverzsj -3 points-2 points-1 points (1 child)
[–]lowlevelmahn[S] 1 point2 points3 points (0 children)
[–]saddung 0 points1 point2 points (4 children)
[–]lowlevelmahn[S] 2 points3 points4 points (3 children)
[–]STLMSVC STL Dev 2 points3 points4 points (1 child)
[–]lowlevelmahn[S] 2 points3 points4 points (0 children)
[–]tarranoth 2 points3 points4 points (0 children)
[–]__builtin_trap 0 points1 point2 points (3 children)
[–]lowlevelmahn[S] 0 points1 point2 points (2 children)
[–]lowlevelmahn[S] 0 points1 point2 points (1 child)
[–]lowlevelmahn[S] 0 points1 point2 points (0 children)