Segmentation fault with -i option, then requested column is absent
|Target version:||Candidate for next bugfix release|
I check this on psxy, but think other programs also affected
echo "1 2"| /home/michael/tmp/gmt5/bin/gmt psxy -i0,3 -JX10c -R0/1/0/1 >/dev/null
ERROR: Caught signal number 11 (Segmentation fault) at
This is a bug.
Interpretation of absent data as NaN can be added as a feature, because some data files have variable number of columns. This often happens in files created from Excel datasheets.
- Assignee set to Paul
- Target version set to Candidate for next bugfix release
Reasonable behavior here should be an error when requested columns exceed number of input columns. Note that this number is known when binary tables are used but unknown for ASCII until we read the data. So it will be necessary to throw an error deep in the belly of GMT. I will see how this should be done.
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
For now I am mostly concerned with stopping execution if inadequate data or options have been applied. Thus, r16447 has added checks in programs that read tables. The record-by-record programs usually catch this problem as they process the records. GMT does not really handle variable-length data records as they do not match our paradigm.