Can't view the contents. Im on Ubuntu 20.04. Whenever I try to open the map of vectors debugger crashes with
and keeps loading forever
this is my map. Node * has no overridden hash method and actually is pretty basic
struct Node{
const int id;
Node * sccRepresentant = nullptr;
int size = 1;//used in sccGraph
vector<Node *> outConnections;
vector<Node *> inConnections;
vector<Node *> sccOutConnections; //if node is scc - these are connections to other sccs
vector<Node *> sccInConnections; //if node is scc - these are connections to other sccs
Node(int id):id(id){}
};
The issue is gone when I change the key from Node * to int
Also I noticed - this happens when pretty printing is enabled
IDE - visual studio code Insiders
using this extension
I tried reinstalling gdb
my launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [
"<",
"test"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
this is the log i get
question from:
https://stackoverflow.com/questions/65870377/gdb-crashes-with-nullreferenceexception-on-map-opening