microsoft / microsoft/vscode-cpptools
Debugger pauses unexpectedly and also has SegFaults and unknown signals which only occur during debugging
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
Environment
- OS and version: Windows
- VS Code: 1.90.2
- C/C++ extension: 1.20.5
- GDB / LLDB version: 14.1
Bug Summary and Steps to Reproduce
Bug Summary:
When running the debugger, random segmentation faults have begun occuring, and the debugger will also stop on lines which do not have any breakpoint. This has only begin happening recently (within the last week), beforehand I was able to run the debugger without any issues.
I have tried rebuilding, reverting to an older version of the extension and of vscode, and switching to an older version of my source code. The same segmentation fault issue has been persistent on all of these.
It is not the same code which causes the segmentation fault either, it seems to occur randomly on any code (including system libraries)
Debugger Configurations
"name": "debug config",
"type": "cppdbg",
"request": "launch",
"program": "app.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\tools\\mingw32\\bin\\gdb.exe",
"preLaunchTask": "make debug",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "set charset UTF-8"
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
Debugger Logs
An example error
1: (4015) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4015) ->(gdb)\r\n"},"seq":1628}
1: (4015) ->(gdb)
--> R (stackTrace-12): {"type":"response","request_seq":12,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"ntdll.dll!ntdll!RtlGetCurrentServiceSessionId","line":0,"column":0,"instructionPointerReference":"0x776f0957","moduleId":1},{"id":1001,"name":"[Unknown/Just-In-Time compiled code]","line":0,"column":0,"instructionPointerReference":"0xd95398a4"},{"id":1002,"name":"ntdll.dll!ntdll!RtlRemovePropertyStore","line":0,"column":0,"instructionPointerReference":"0x77730add","moduleId":1},{"id":1003,"name":"ntdll.dll!ntdll!RtlFreeHeap","line":0,"column":0,"instructionPointerReference":"0x776ef706","moduleId":1},{"id":1004,"name":"ntdll.dll!ntdll!RtlRegisterSecureMemoryCacheCallback","line":0,"column":0,"instructionPointerReference":"0x77786716","moduleId":1},{"id":1005,"name":"ntdll.dll!ntdll!RtlGetCurrentServiceSessionId","line":0,"column":0,"instructionPointerReference":"0x776ef846","moduleId":1},{"id":1006,"name":"[Unknown/Just-In-Time compiled code]","line":0,"column":0,"instructionPointerReference":"0x04242a70"},{"id":1007,"name":"ntdll.dll!ntdll!RtlRemovePropertyStore","line":0,"column":0,"instructionPointerReference":"0x77730add","moduleId":1},{"id":1008,"name":"ntdll.dll!ntdll!RtlFreeHeap","line":0,"column":0,"instructionPointerReference":"0x776ef706","moduleId":1},{"id":1009,"name":"mfedeeprem32.dll!mfedeeprem32!UnitTestInitialise","line":0,"column":0,"instructionPointerReference":"0x652fed1a","moduleId":37},{"id":1010,"name":"mfedeeprem32.dll!mfedeeprem32!UnitTestInitialise","line":0,"column":0,"instructionPointerReference":"0x652fddb5","moduleId":37},{"id":1011,"name":"mfedeeprem32.dll!mfedeeprem32!UnitTestInitialise","line":0,"column":0,"instructionPointerReference":"0x652fbd07","moduleId":37},{"id":1012,"name":"ntdll.dll!ntdll!RtlNumberOfSetBitsUlongPtr","line":0,"column":0,"instructionPointerReference":"0x77731ea6","moduleId":1},{"id":1013,"name":"ntdll.dll!ntdll!LdrShutdownThread","line":0,"column":0,"instructionPointerReference":"0x776e6cda","moduleId":1},{"id":1014,"name":"[Unknown/Just-In-Time compiled code]","line":0,"column":0,"instructionPointerReference":"0x00000001"}],"totalFrames":15},"seq":1630}
<-- C (threads-13): {"command":"threads","type":"request","seq":13}
--> R (threads-13): {"type":"response","request_seq":13,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":" [1]"},{"id":2,"name":" [2]"},{"id":3,"name":" [3]"},{"id":4,"name":" [4]"},{"id":5,"name":"MojoThread [5]"},{"id":6,"name":" [6]"},{"id":7,"name":" [7]"},{"id":8,"name":" [8]"},{"id":9,"name":" [9]"},{"id":17,"name":" [17]"},{"id":18,"name":" [18]"},{"id":19,"name":" [19]"}]},"seq":1633}
Other Extensions
llvm-vs-code-extensions.vscode-clangd
CS128.cs128-clang-tidy
issue persists with these disabled
Additional Information
I am writing a C Webview2 application and building with mingw,
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den Bericht mit der bereitgestellten Konfiguration für Windows, VS Code, die C/C++-Erweiterung, GDB, MinGW und cppdbg zu reproduzieren. Vergleiche die Debugger-Protokolle und Stack Frames, wenn der Debugger unerwartet pausiert oder einen segmentation fault meldet, und grenze das Verhalten anschließend auf eine minimale reproduzierbare C WebView2-Anwendung ein. Als abgeschlossen gilt die Aufgabe, wenn die Ursache identifiziert ist und die Korrektur anhand der gemeldeten Symptome verifiziert werden kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, vscode
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 15/100