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

No Symbols Found #591

Closed
jdavidbakr opened this issue Mar 24, 2017 · 6 comments
Closed

No Symbols Found #591

jdavidbakr opened this issue Mar 24, 2017 · 6 comments

Comments

@jdavidbakr
Copy link

I'm wanting to try out Visual Studio Code but am running into a problem with a C++ project where I'm unable to load symbols in my file.

My symptoms are:

  1. When I type command-shift-O I get a response "No Symbols Found"
  2. If I hover over a symbol (like an #include for example) a popup box says "Loading" but never goes away.

Versions:
Visual Studio Code 1.10.2 8076a19fdcab7e1fc1707952d652f0bb6c6db331
cpptools 0.10.5
OSX 10.12.3

Symbols are resolving properly in my PHP projects, so it's something specific with cpptools. I even tried disabling all extensions except for cpptools.

@sean-mcmanus
Copy link
Contributor

"No Symbols Found" means the current file hasn't been parsed yet. Opening the file should trigger a parse on the main thread. The "Loading" on hover means the main thread is blocked. This is very bad and not expected behavior. Did you change your files.exclude right beforehand? Is the Microsoft.VSCode.Cpp.Extension.darwin process using CPU? Can you tell if it has crashed?

@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state labels Mar 24, 2017
@jdavidbakr
Copy link
Author

No, it's pretty much a new install (I opened a couple of PHP projects before I opened my C++ project), I didn't change any config files in this project. Looking at the Activity Monitor, the Microsoft.VSCode.CPP.Extension.darwin is at 0% cpu.

image

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Mar 27, 2017

Yeah, it looks like our process is crashing (the main thread is crashing, but the process remains). Can you get any crash info on the Mac? Windows has an Event Viewer with crashes logged and I remember Mac had something similar. We need to get a call stack or repro. Narrowing down the repro steps would also help. Or if you can repro the bug on Windows we could get a dmp that way. Can you open your folder without opening any files while the Mac config in the bottom right is red and wait till it is white? It's possible that a file is causing our parser to crash due to unexpected characters. If you could open a smaller workspace or add files.exclude for particular file types, that could help narrow down the file that is causing problems. Non-C/C++ files with an extension VS Code expects to be C/C++ could cause it (e.g. .inl).

@jdavidbakr
Copy link
Author

Yes, I do have crash logs, here is the section on the thread that crashed:

Process:               Microsoft.VSCode.CPP.Extension.darwin [70951]
Path:                  /Users/USER/*/Microsoft.VSCode.CPP.Extension.darwin
Identifier:            Microsoft.VSCode.CPP.Extension.darwin
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        Code Helper [70579]
Responsible:           Microsoft.VSCode.CPP.Extension.darwin [70951]
User ID:               501

Date/Time:             2017-03-27 11:08:42.756 -0500
OS Version:            Mac OS X 10.12.3 (16D32)
Report Version:        12
Anonymous UUID:        8EF937B1-94B7-F13C-F827-55F4FA63FA2B

Sleep/Wake UUID:       1075083F-1C2F-4CC1-B518-E5EF75B18658

Time Awake Since Boot: 260000 seconds

System Integrity Protection: enabled

Crashed Thread:        7

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000038
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

...
(skipping detail about threads 1-6)
...

Thread 7 Crashed:
0   Microsoft.VSCode.CPP.Extension.darwin	0x0000000108a01ea0 exclusion_checking_iterator<microsoft::vc::recursive_directory_iterator_utf8>::update_state() + 80
1   Microsoft.VSCode.CPP.Extension.darwin	0x0000000108a01cb8 exclusion_checking_iterator<microsoft::vc::recursive_directory_iterator_utf8>::exclusion_checking_iterator(microsoft::vc::path_utf8 const&, std::__1::vector<pattern_matcher, std::__1::allocator<pattern_matcher> > const&) + 168
2   Microsoft.VSCode.CPP.Extension.darwin	0x0000000108a0193c microsoft::vc::result_t parser::process_path<microsoft::vc::recursive_directory_iterator_utf8>(microsoft::vc::path_utf8 const&, std::__1::function<microsoft::vc::result_t (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>, std::__1::function<microsoft::vc::result_t (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>) + 108
3   Microsoft.VSCode.CPP.Extension.darwin	0x00000001089f7380 parser::add_files(microsoft::vc::path_utf8&, browse_engine*, bool) + 352
4   Microsoft.VSCode.CPP.Extension.darwin	0x00000001089f6f52 browse_engine::generate_file_list(bool, bool) + 690
5   Microsoft.VSCode.CPP.Extension.darwin	0x00000001089db03b message_handler::parse_root() + 251
6   Microsoft.VSCode.CPP.Extension.darwin	0x00000001089daee5 void* std::__1::__thread_proxy<std::__1::tuple<vscode::handler_base<message_handler>::main_loop()::'lambda1'()> >(void*) + 117
7   libsystem_pthread.dylib       	0x00007fffaca0aaab _pthread_body + 180
8   libsystem_pthread.dylib       	0x00007fffaca0a9f7 _pthread_start + 286
9   libsystem_pthread.dylib       	0x00007fffaca0a1fd thread_start + 13

...
More info about the system state
...

I'll also also attach the entire crash log if you need to see the entire thing.
Microsoft.VSCode.CPP.Extension.darwin_2017-03-27-110842_Jons-MacBook-Pro.crash.gz

Interestingly enough on a different computer it's working fine, so it's not the files in the folder.

@sean-mcmanus
Copy link
Contributor

Thanks a lot for reporting this bug. We believe we have a fix for the bug and should have it released in the next update (next week?). When the call to nftw fails (unknown repro) we were holding onto an invalidated iterator, which could crash when dereferenced. This should fix the crash, but failing to traverse the workspace/include directories could lead to symbols being missing.

@sean-mcmanus sean-mcmanus self-assigned this Mar 27, 2017
@sean-mcmanus sean-mcmanus added bug and removed more info needed The issue report is not actionable in its current state labels Mar 27, 2017
@bobbrow
Copy link
Member

bobbrow commented Apr 25, 2017

This issue should be fixed with v0.11.0. Please let us know if you are still having issues.

@bobbrow bobbrow closed this as completed Apr 25, 2017
@sean-mcmanus sean-mcmanus removed their assignment Apr 22, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants