Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging Step-into results in a stack-overflow like error #13092

Open
jd-young opened this issue Dec 31, 2024 · 2 comments
Open

Debugging Step-into results in a stack-overflow like error #13092

jd-young opened this issue Dec 31, 2024 · 2 comments

Comments

@jd-young
Copy link

Type: Bug

Typical debugging a C++ MFC program, step into a method then the debugger pauses for around two seconds and shows a 0xC0000005 access violation and the stack trace shows a load of mfc140d.dll, user32.dll, msvcp140d.dll and ntdll.dll calls with Unknown Source.

This happens seemingly randomly, in stepping into different functions on each run. Other debugging commands work as expected (step-over, step-out, etc), only step-into commands fail after a few step ins - like I say, seemingly at random and into different functions.

Extension version: 1.22.11
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-12700H (20 x 2688)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.69GB (15.76GB free)
Process Argv --crash-reporter-id fc49156a-2f73-4514-b72b-578d62ca5db8
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
a9j8j154:30646983
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

@jd-young
Copy link
Author

jd-young commented Jan 1, 2025

Okay, more information.

When the problem appeared, I got this in the debug console:

Debug Assertion Failed!

Program: C:\Users\jyoun\Projects\xxxx.exe
File: c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\deque
Line: 379

Expression: cannot seek deque iterator out of range

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

I don't use std::deque at all, but I do use a std::stack which turns out to use a deque. I also noticed that I had _fileStack._stack.top() in the Watch window and that when I stepped into a function, I saw 'The evaluation was aborted because of an unhandled exception occurred' (probably because the stack was empty).

When I removed the _stack entry from the Watch window, but program ran just fine, and I was able to step into functions just as normal.

So, there isn't a bug in either my software or Visual Code, however, it is far from obvious what was going wrong.

Maybe instead of classifiying this as a bug, we could change this to a request for improvement (or similar), to have Visual Code make it more obvious what the actual problem was. I'm not sure how to do that, and I am definitely alerted to this type of problem from now on, so probably not worth it for me, but my help some developers down the line.

Copy link

github-actions bot commented Jan 1, 2025

Thank you for reporting this issue. We’ll let you know if we need more information to investigate it. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants