Debugging ASCEND
From ASCEND
We use the Mantis bug tracker located at http://ascendbugs.cheme.cmu.edu/.
- Visit the ASCEND Bug Tracker now.
Contents |
What to do if ASCEND crashes
If you find that ASCEND has a crash, and you are using Linux, and you installed ASCEND using 'scons install', please try launching ASCEND through GDB. The best and easiest way to do this, owing to the fact that the ASCEND PyGTK GUI runs via the Python interpreter, is to type the following into a console
ASC_GDB=1 ascend
You will get a GDB prompt at which you should type
r
to start running the ASCEND PyGTK GUI. Then try to reproduce the crash. When the crash occurs, return to the console window and see what it says. You can type
where
to get full details of where the crash occurred. Unfortunately it's not so easy with Windows.
Running locally
If you have a working copy of ASCEND checked out from our subversion repository, and you have run 'scons' to build a local copy of ASCEND (let's assume it's in ~/ascend, you can run it with needing to install anything. Just type
cd ~/ascend scons pygtk/ascdev models/johnpye/testlog10.a4c
and that will launch the PyGTK GUI and load the models/johnpye/testlog10.a4c test file, after first setting all the necessary environment variables to allow ASCEND to run from the working directory. Sometimes you may find that it picks up system files eg /usr/lib but usually it should all work fine. This is particularly useful during the edit-run-debug daily development cycle.
The script that you're running in this case is pygtk/ascdev.in, which is text-processed by SCons to produce the ascdev script.
Notes when using Mantis
Linking from the Bug Tracker to this Wiki
If you enter text in a bug note or bug report with a pair of square brackets around it, the text will be transformed into a Wiki link, eg [[DebuggingAscend]] becomes DebuggingAscend.
This has been implemented using a 'tweak' on Mantis, see Automatic URL linking to ViewVC from Mantis.
Linking for the Bug Tracker to ViewCVS
If you enter 'changeset N' or 'rev N' or 'revision N' into the bug tracker, it will automatically be transformed into a link to the ViewCVS pages on the CMU server. This allows people reviewing a bugfix to quickly identify what changes were made.
This has also been implemented using a 'tweak' on Mantis, see Automatic URL linking to ViewVC from Mantis.
Linking subversion commits to the Bug Tracker
If you make a subversion commit to the ASCEND repository with text like 'fixed bug #200' or 'fixed bug 200' or 'bug 200' or 'bug #200' or even just '#200' then the commit message will be added as a bug note to the bug in question. And if the text includes 'fixed' it should mark the bug as resolved, with the resolution being 'fixed'.
To be explicit, the following regular expressions are used for this feature:
- to annotate a bug: '/\b(?:bug|issue)\s*\#?(\d+)\b/i'
- to mark a bug as having been fixed: '/\bfix(?:ed|es)\s+(?:bug|issue)?\s*\#?(\d+)\b/i'
For an example of how this works in practise, see bug 358.
This has been implemented using standard Mantis capabilities as described in the Mantis manual.
'Panic' reports
People using ASCEND who see a 'panic' message will be directed to BugReport on this Wiki, which will give further instructions.
This feature was implemented in the Tcl/Tk GUI but is currently disused. We would like a way of quickly and easily receiving Python error messages from users.
Building with debug info
If you compile ASCEND with "scons DEBUG=1", your output files will include debug data that will make the use of the above "ASC_GDB=1" form more useful, because GDB will be able to provide you with line numbers and function call details to you help with locating your error.
Other comments
There are a heap of in-source 'TODO' comments collected by Doxygen, which you can view in our resulting code docs. If you want to make a 'FIXME' or 'TODO' annotation in your code, it is recommended that you follow the Doxygen convention.
Other items:
- do we need to keep the cvs versioning tag lines in the sources?
- do we need to keep the module ID string definitions in the sources?

