Grdtrack issues using list (gmt6)

I am experiencing a problem when using grdtrack using a list of netCDF grids. Whereas the gmt5(.4.5) version seems to work, the gmt6(.4, also dev) version fails (creating a segmentation fault). Has anyone experienced the same?

I wrote a small routine which illustrates the findings:


gmtswitch $gmtver


gmt grdmath $RR -I.1 0 0 CDIST = distance.grd
gmt psxy $RR $JJ -K -X3 -Y3 -T > $psfile

echo 1
gmt makecpt -Crainbow $(grdinfo distance.grd -T.1) > col.cpt
gmt grdimage $RR $JJ -Ccol.cpt -Bxyag0f -O -K distance.grd -BWSen >> $psfile
gmt psscale -Dx0/-1.5+w6/.25h -Bxag0f+l"Distance, m" -Ccol.cpt -O -K >> $psfile

echo 2
gmt grdmath distance.grd SQRT = distance-sqrt.grd
gmt makecpt -Chot $(grdinfo distance-sqrt.grd -T.1) > col.cpt
gmt grdimage $RR $JJ -Ccol.cpt -Bxyag0f -O -K distance-sqrt.grd -BWSen -X7.5>> $psfile
gmt psscale -Dx0/-1.5+w6/.25h -Bxag0f+l"Sqrt of Distance, m**.5" -Ccol.cpt -O -K >> $psfile

echo 3
gmt grdmath distance.grd distance.grd MUL = distance-squared.grd
gmt makecpt -Cseis $(grdinfo distance-squared.grd -T.1) > col.cpt
gmt grdimage $RR $JJ -Ccol.cpt -Bxyag0f -O -K distance-squared.grd -BWSen -X7.5 >> $psfile
gmt psscale -Dx0/-1.5+w6/.25h -Bxag0f+l"Distance squared, m**2" -Ccol.cpt -O -K >> $psfile

gmt psxy $RR $JJ -O -T >> $psfile

echo “distance.grd distance-sqrt.grd distance-squared.grd” |
gawk ‘{for (i=1;i<=NF;i++) printf “%s\n”,$i}’ > gridlist
cat gridlist

echo “1 1” |
gmt grdtrack -G+lgridlist -V > result-$gmtver.txt


As I said in a recent post, please do not post examples that are unix specific. Normally a one- or two-liners is all it takes to show a problem.