Bug #2652
cscripts that do not derive from ctools.cscript do not show help text
Status: | Closed | Start date: | 07/25/2018 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 1.6.0 | |||
Duration: |
Description
When a cscript that does not derive from ctools.cscript
is used with the --help
option, no help text is shown and the following text is displayed on the screen (on a Mac OS X):
Usage: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python [-l] [-b] [-n] [-q] [dir] [[file:]data.root] [file1.C ... fileN.C] Options: -b : run in batch mode without graphics -x : exit on exception -n : do not execute logon and logoff macros as specified in .rootrc -q : exit after processing command line macro files -l : do not show splash screen dir : if dir is a valid directory cd to it before executing -? : print usage -h : print usage --help : print usage -config : print ./configure options -memstat : run with memory usage monitoring
In the
ctools
code analysis, this scripts exit with a segmentation fault. See #2236.
Recurrence
No recurrence.
Related issues
History
#1 Updated by Knödlseder Jürgen over 6 years ago
- Related to Bug #2236: Segmentation fault error occur during Python coverage measurement added
#2 Updated by Knödlseder Jürgen over 6 years ago
Here the list of scripts where the help text works:
Commenting the line shows the help text. This could be related to the fact that importing scripts opens a X windows connection.
- cscaldb(ctools.cscript)
- csebins(ctools.csobservation)
- csfindobs(ctools.cscript)
- csiactcopy(ctools.cscript)
- csiactdata(ctools.cscript)
- csiactobs(ctools.cscript)
- csmodelmerge(ctools.cscript)
- cslightcrv(ctools.csobservation)
- csmodelinfo(ctools.cscript)
It appears that for example in csmodelmerge
the following line leads to the problem:
from cscripts import modutils
Commenting the line shows the help text. This could be related to the fact that importing scripts opens a X windows connection.
#3 Updated by Knödlseder Jürgen over 6 years ago
- % Done changed from 0 to 10
The X windows connection is open when importing csroot2caldb
in the __init__.py
file using the line
from cscripts.csroot2caldb import csroot2caldb
The reason is that
csroot2caldb
imports ROOT
, which seems to be the culprit for opening the X windows connection. Commenting out this line does no longer lead to the help text issue.#4 Updated by Knödlseder Jürgen over 6 years ago
- Status changed from New to Closed
- % Done changed from 10 to 100
Merged into devel
.