Feature #664

clarification for common -i option documentation and segmentation fault

Added by Jason almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:2015-01-21
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Platform:

Description

The documentation for the common -i option does not clearly indicate that column indices are 0-based, I had to dig down to Section 9.4.15 in GMT_Docs.html to find it (not the man pages - 1.8.5, for example).

Incorrectly specifying columns using 1-based indices may result in a request for a non-existent data column, which causes a segmentation fault in psxy (GMT 5.1.1 windows binaries in Cygwin). A graceful exit and error message would be useful.

A diff file is humbly attached with possible modifications to the two -i option descriptions I could find in the source code (there may be other appropriate locations). I'm not sure I created this file correctly. I don't know how to implement a check on column indices and a graceful exit.

Thank you,

Jason

i_opt_docs.diff Magnifier - possible modification of -i option descriptions (1.51 KB) Jason, 2015-01-21 11:24

Associated revisions

Revision 13959
Added by Paul almost 3 years ago

IMprove -i and -o explanations, per issue #664

History

#1 Updated by Paul almost 3 years ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

Thanks, I have implemented your documentation suggestions (same for -o) in r13959. I will see if I can add such a test without too much overhead.

#2 Updated by Paul over 2 years ago

  • Status changed from Resolved to Closed

Closing this issue.

Also available in: Atom PDF