Cannot launch Debugger

Asked by Tao

Hi all,
I met a problem when I tried to launch the debugger. Actually, I got the scons.profile-default as bellow:
PREFIX = '/home/tao/yade/YADEb2'
debug = True
features = 'gts,log4cxx,opengl,openmp,qt4,vtk'
version = 'b2'
CXX = 'ccache g++'
CXXFLAGS = []
defThreads = 2
SHCCFLAGS = ['-fPIC']

The problem is that when a "segmentation fault" occurs, the debugger cannot be automatically launched at crash. I do not know how to handle that then. Could anybody tell me a solution?

Thanks,

Tao

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

I think it is too late for live debugging when you hit the segfault
point. You get a backtrace and that is all.
Do you know this: https://yade-dem.org/wiki/Debugging_using_Kdevelop?

Revision history for this message
Václav Šmilauer (eudoxos) said :
#2

Hi Thao,

first, do you have gdb installed?

Second, you can always run Yade in debugger from the start,

$ gdb /usr/bin/python
...
(gdb) run /usr/local/bin/yade-something --debug script.py ## put where yade is installed
... ## wait for it to crap out
(gdb) thread apply bt full

Third, watch out for the debug=True/False flag. If you compile with debugging, you need to run yade with --debug, otherwise the non-debug version (which installs plugins without the /dbg/ subdir) is run.

HTH, v.

(PS. Please for the others... I appreciate that you are trying to answer, but... can you be more to the point perhaps? No offense.)

Revision history for this message
Yade Guide (yade-guide) said :
#3

Hey there! As an automated bot, I've scanned through relevant threads and compiled a summary for your reference. Feel free to explore further by clicking on the links attached.

Title: "segmentation fault"
The user encounters a segmentation fault while running Yade 1.07.0 on Ubuntu 14.04 after 60,000 iterations. They have tried following the instructions from https://www.yade-dem.org/doc/user.html#crashes and installing the daily version without success. Jan suggested opening a bug on launchpad.net/yade, attaching both the script file and any gts files to help identify or fix the issue. Thanks Jan Stránský, that solved my question.
https://answers.launchpad.net/yade/+question/252356

Title: "debugging yade"
Bettina encountered issues with the clump breakage algorithm in bf.py while debugging Python code using KDevelop on Ubuntu 20.04. Robert suggested using pdb.set_trace() or adding breakpoints, which allowed her to debug the save-load-clumps.py example. Bettina is now trying to define and break different clumps to understand how to set various algorithm parameters.
https://answers.launchpad.net/yade/+question/702251

Can you help with this problem?

Provide an answer of your own, or ask Tao for more information if necessary.

To post a message you must log in.