-
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
After some time all extension-related functions stop working with SIGFAULT (Linux) #608
Comments
What version of cpptools do you have? Is Microsoft.VSCode.Cpp.Extension.linux running? Is it using CPU? Is "Linux" red in the bottom right? Do you get a crash message? If you can attach a debugger to the .linux process and get a dmp that would be good. The only known bug where this could happen is after you change your files.exclude settings. |
Yep, my bad. So here is the info:
During normal workflow I edit plain text files and C++ files. Sometimes several C++ files with the same names from different directories/projects. And I actually found core dump. GDB says that it segfaulted here:
|
Thanks a lot for the call stack. The bug repros when UTF8 chars > 1 byte are used. We fixed a bunch of bugs in the scenario, but this is one we missed. What is the encoding of the file? If it's not UTF8, we probably have additional problems. Are you able to determine which characters are causing the crash so I can verify our fix works? Our code assumes the input is a UTF8 string, then converts it to UTF32, lowercases it, and then converts the UTF32 to UTF8. So I have a fix for one bug with our code which always wrote in 4 byte increments even if the source string was < 4 bytes long, but without a repro, I'm not sure if there are additional bugs. |
The file supposed to be in UTF8. I don't know what character triggers it.
…On Wed, Apr 5, 2017, 12:36 Sean McManus ***@***.***> wrote:
Thanks a lot for the call stack. The bug repros when UTF8 chars > 1 byte
are used. We fixed a bunch of bugs in the scenario, but this is one we
missed. What is the encoding of the file? Are you able to determine which
characters are causing the crash so I can verify our fix works? Our code
assumes the input is a UTF8 string, then converts it to UTF32, lowercases
it, and then converts the UTF32 to UTF8.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#608 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABVSb2orhF6d9nJWaFBAxwKgqQCb6NtBks5rs-0egaJpZM4MzvlL>
.
|
Any ETA on a fix? Right now extension is pretty much unusable because it fails after a few minutes every time. Or probably there is a way to get experimental version? |
We're planning to release an update "soon" which may have the fix. Is changing the autocomplete setting to "Disabled" a work around? Does the bug only repro when editing and only with autocomplete or is there another repro scenario? The current fix prevents the crash from the call stack you provided (in to_lower_utf8 and to_upper_utf8), but I'm worried that the root cause may be a document corruption that is creating invalid UTF8 characters. Getting a more solid repro would help. Are you able to get a repro with an open source project with only 1 byte UTF8 characters? If you change the addWorkspaceRootToIncludePath setting to false and delete your .browse.vc.db (or change the databaseFilename property in c_cpp_properties.json) then it should limit the amount of files that are processed, potentially preventing the bad UTF8 characters from entering the database. |
We made some fixes in this area and published them with v.0.11.0. Can you try again and see if the experience has improved? Thanks! |
Hi, i can still see those segfaults after several seconds. I do embedded c/c++ development. Simply get the esp32 idf sdk from espressif and do some hacking :-). It will crash after some seconds and renders the whole autocompletion useless ;-/. Given: OS: vscode:
cpptools: Settings:
Then:
|
@9cubes We need a repro, call stack, core dmp, etc.. Our pending update does have some crash fixes, but I need to see the call stack to tell if it's a fixed crash or not. |
Just adding this here: This still happens on Version 1.9.0 (1.9.0) |
@jamesone There are many possible root causes of the crash you are experiencing. Please file a new bug and let us know at least the top few lines of the crashing thread shown in the crash log at ~/Library/Logs/DiagnosticReports . Any other info such as a way to repro the crash would help. |
Closing this issue due to long inactivity. If you update to the latest version of the C/C++ extension and your issue still persists, please re-open the issue and reply with additional information that can help us investigate the issue. |
I have VSCode installed on OpenSUSE it is configured for C++. When I start the IDE it works as charm, but after some time all the functions stop working (auto-completion, formatting, etc.). I have no idea how to debug this to provide more information.
The text was updated successfully, but these errors were encountered: