Except the C++ “Core dumped” line is telling you it just wrote a file out with the full state of the program at the time of the crash, you can load it up and see where it crashed and then go and look at what every local variable was at the time of the crash.
Pretty sure you can even step backwards in time with a good debugger to find out exactly how you got to the state you’re currently in.
It intentionally acts as an intercept for such things, so that core dumps can be nicely packaged up and sent to maintainers in a GUI-friendly way so maintainers can get valuable debugging information even from non-tech-savvy users. If you’re running something on the terminal, it won’t be intercepted and the core dump will be put in the working directory of the binary, but if you executed it through the GUI it will.
Assuming, of course, you turn crash interception on- it’s off by default since it might contain sensitive info. Apport itself is always on and running to handle Ubuntu errors, but the crash interception needs enabled.
Except the C++ “Core dumped” line is telling you it just wrote a file out with the full state of the program at the time of the crash, you can load it up and see where it crashed and then go and look at what every local variable was at the time of the crash.
Pretty sure you can even step backwards in time with a good debugger to find out exactly how you got to the state you’re currently in.
Where does it write the file
Nobody knows
deleted by creator
On a secret FBI server somewhere where they watch your failures and laugh
deleted by creator
If you are using systemd, there’s a tool called coredumpctl.
I believe it’s
/var/lib/apport/coredump
on Ubuntu.imagine if it, like, told you this so you didn’t have to find out about it via a post on lemmy
imagine if it like, read that file and gave you a stack trace
gdb gives you waaaaaaaaaaaaaaay more than a stack trace.
Imagine if you knew the most basic foundational features of the language you were using.
Next we’ll teach you about this neat thing called the compiler.
I’m not a C/C++ dev, but isn’t
apport
Ubuntu’s crash reporter? Why would dumps be going into there?Though on a rhetorical thought, I am aware of systemd’s
coredumptctl
so perhaps its collecting dumps the same way systemd does.https://wiki.ubuntu.com/Apport
It intentionally acts as an intercept for such things, so that core dumps can be nicely packaged up and sent to maintainers in a GUI-friendly way so maintainers can get valuable debugging information even from non-tech-savvy users. If you’re running something on the terminal, it won’t be intercepted and the core dump will be put in the working directory of the binary, but if you executed it through the GUI it will.
Assuming, of course, you turn crash interception on- it’s off by default since it might contain sensitive info. Apport itself is always on and running to handle Ubuntu errors, but the crash interception needs enabled.
i mean you’re expected to know the basic functioning of the compiler when you use it