-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
namespace named interface
causes extension to loop infinitely
#4470
Comments
Can you enable debug logging (https://code.visualstudio.com/docs/cpp/enable-logging-cpp) and/or attach a debugger and view the call stacks. Or are the database or flame icons showing a status? One possibility is that you may have a symlink that points to some large directory, such as your root drive (see #3123). You could change the browse.path setting to include less folders (or use "*" to make the paths non-recursive). |
Neither database nor flame icon was being shown. The is no symbol link in my directory. I reduced my project to one cpp file which has only 6 lines and was running with one core 100% usage, after I closed vscode, the extension was still running with one core 100% for infinite time, some time later even with two cores(both were running with 100% usage). I attached the process with gdb and saw the following backtraces:
It seemed that a thread was busy and never end. |
The call stack shown is waiting for another thread to complete. Can you provide the call stack of the thread that is actually doing work? Do you know what is triggering the shutdown? Are these dangling processes from a previous shutdown or do they appear again after opening the folder? Can you kill the processes? |
I can kill the process with
this thread keeps looping from line 517 to 531 in file memmove-vec-unaligned-erms.S, it seems getDocumentSymbol() is reading the document without reaching the end. I hope it will be helpful to you. |
This is a regression compared to 0.25.1, right? The getDocumentSymbol got changed with new code to handle nested scopes in the outline view. Unfortunately, the call stack doesn't show the line numbers so we're not sure where the memmove is being attempted. This code gets run when a document opens and the problem should be specific to a particular document's text, i.e. it doesn't repro with a simple "void main(){}" file right? Are you able to isolate what code in the document is causing the bug and provide a code sample? We had some bugs previously with code that had nested namespaces. |
The tests above were based on 0.26.0. Today I updated my extension to 0.26.1 and reduced my code to one line which still causes the issue: This line of code is global(not in any namespace nor function). If I remove the This behavior is reproducible in linux but not reproducible under windows. |
Thanks a lot -- we got a repro -- the usage of keyword "interface" is causing the problem. |
interface
causes extension to loop infinitely
Fixed in version 0.26.2-insiders, available at https://github.com/microsoft/vscode-cpptools/releases/tag/0.26.2-insiders. |
After an observation of two weeks, this issue has not appeared any more. |
Issue Type: Performance Issue
Since some weeks this extension starts to run some processes to ocuppy cpu(2 - 4 cores) for inifite time, even if I left it run for the whole week, it never stop. Now my vscode hangs for some second after I type a word, it not possible for me to use this ext any more.
Extension version: 0.26.0
VS Code version: Code 1.39.2 (6ab598523be7a800d7f3eb4d92d7ab9a66069390, 2019-10-15T15:33:40.634Z)
OS version: Linux x64 4.4.0-165-generic
System Info
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: disabled_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: disabled_software
viz_display_compositor: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Process Info
Workspace Info
The text was updated successfully, but these errors were encountered: