# Grdtrack issues using list (gmt6)

**URL:** <https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762>\
**Category:** Q&A\
**Created:** [April 2, 2024, 10:40am UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762 "2024-04-02T10:40:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvanneste](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mvanneste](https://forum.generic-mapping-tools.org/u/mvanneste)\
**Post date:** [April 2, 2024, 10:40am UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/1 "2024-04-02T10:40:42Z")

</div>

All,  
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:

#!/bin/sh

gmtver=gmt\_dev  
gmtswitch $gmtver

RR=-R-5/5/-5/5  
JJ=-JX6

gmt grdmath $RR -I.1 0 0 CDIST = distance.grd

psfile=grdtrack-summary.ps  
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

exit

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [April 2, 2024, 12:28pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/2 "2024-04-02T12:28:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mvanneste](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mvanneste](https://forum.generic-mapping-tools.org/u/mvanneste)\
**Post date:** [September 20, 2025, 8:07pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/3 "2025-09-20T20:07:59Z")

</div>

Following up on this thread:  
I have upgraded to GMT6.6, but still have the same errors when extracting values from netCDF grids using the list option (grdtrack -G+lgridlist). While it works fine with gmt5, it fails with gmt6. Can someone confirm or suggest what may be different?  
The error message contains information listed underneath:  
ERROR: Caught signal number 11 (segmentation fault) at  
… GTM\_grdtrack+0x14fa  
Stack backtrace:  
… libgmt.so.6 … libc.so.6  
etc.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [September 20, 2025, 9:33pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/4 "2025-09-20T21:33:40Z")

</div>

> Can someone confirm or suggest what may be different?

How can someone suggest anything with a post like this?

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [September 20, 2025, 10:52pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/5 "2025-09-20T22:52:36Z")

</div>

I ran the code from the topic. Not exactly, but after replacing those f-cking unicode quotes (I hate doing this!), replacing `grdinfo` with `gmt grdinfo`, fixing a few broken pipelines with newline chars inserted after `|` (very stupid formatting!), throwing out the `gmtver` and `gmt_dev` stuff from that piece of code as it makes no sense on my machine. Added `-Vd` for that `gmt grdtrack` call.

Apparently something happened after gmt 6.3.0 as 6.3.0 executed the code and terminated normally. Please see more below.

Executed in gmt 6.3.0: terminated normally. `results` contained

```auto
1	1	1.41421353817	1.18920707703	1.99999988079

```

`gmt grdtrack -Vd` just in case:

```auto
gmt [DEBUG]: GMT_Create_Session: Terminal width = 80
gmt [DEBUG]: Obtained the ppid from parent: 2855187
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /usr/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /home/mkononets
gmt [DEBUG]: GMT->session.USERDIR = /home/mkononets/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /home/mkononets/.gmt/cache [created]
gmt [DEBUG]: GMT: 0. Will try to find subdir=postscriptlight stem = PSL_custom_fonts suffix=.txt
gmt [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
gmt [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR /home/mkononets/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /home/mkononets/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /usr/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. gmt_getsharepath trying SHAREDIR /usr/share/gmt
gmt [DEBUG]: GMT: 6. gmt_getsharepath failed
gmt [DEBUG]: Map distance calculation will be Cartesian
gmt [DEBUG]: Exit: gmtinit_new_GMT_ctrl
gmt [DEBUG]: Enter: New_PSL_Ctrl
gmt [DEBUG]: Exit: New_PSL_Ctrl
gmt [DEBUG]: Enter: gmt_manage_workflow
gmt [DEBUG]: Exit : gmt_manage_workflow
gmt [DEBUG]: Enter: PSL_beginsession
gmt [DEBUG]: Exit : PSL_beginsession
gmt [DEBUG]: Enter: PSL_setdefaults
gmt [DEBUG]: Exit : PSL_setdefaults
gmt [DEBUG]: Enter: gmtlib_io_init
gmt [DEBUG]: Exit : gmtlib_io_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_reload_settings
gmt [DEBUG]: The PROJ_GEODESIC set to Vincenty
gmt [DEBUG]: Look for file /home/mkononets/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/cache/gmt.conf
gmt [DEBUG]: Could not find file gmt.conf
gmt [DEBUG]: Exit: gmt_reload_settings
gmt [DEBUG]: Enter: gmtlib_plot_C_format
gmt [DEBUG]: Exit: gmtlib_plot_C_format
gmt [DEBUG]: Enter: gmtinit_get_history
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Exit: gmtinit_get_history
gmt [DEBUG]: Initialize FFTW with 4 threads.
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Loading core GMT shared library: libgmt.so
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.so
gmt [DEBUG]: Loading GMT plugins from: /usr/lib/x86_64-linux-gnu/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /usr/lib/x86_64-linux-gnu/gmt/plugins/supplements.so
gmt [DEBUG]: Revised options: -G+lgridlist -Vd
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Calling nc_open on gridlist, ncid = 0, err = -51
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Found readable file distance.grd
grdtrack [DEBUG]: Replace file distance.grd with path distance.grd
grdtrack [DEBUG]: Replace file distance.grd with distance.grd
grdtrack [DEBUG]: Found readable file distance-sqrt.grd
grdtrack [DEBUG]: Replace file distance-sqrt.grd with path distance-sqrt.grd
grdtrack [DEBUG]: Replace file distance-sqrt.grd with distance-sqrt.grd
grdtrack [DEBUG]: Found readable file distance-squared.grd
grdtrack [DEBUG]: Replace file distance-squared.grd with path distance-squared.grd
grdtrack [DEBUG]: Replace file distance-squared.grd with distance-squared.grd
grdtrack [INFORMATION]: Processing input grid(s)
grdtrack [DEBUG]: Found readable file distance.grd
grdtrack [DEBUG]: Replace file distance.grd with path distance.grd
grdtrack [DEBUG]: Found readable file distance.grd
grdtrack [DEBUG]: Replace file distance.grd with path distance.grd
grdtrack [DEBUG]: Found readable file distance.grd
grdtrack [DEBUG]: Object ID 0 : Registered Grid File distance.grd as an Input resource with geometry Surface [n_objects = 1]
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_grid: Passed ID = 0 and mode = 131073
grdtrack [DEBUG]: Found readable file distance.grd
grdtrack [DEBUG]: Calling nc_open on distance.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [DEBUG]: Calling nc_open on distance.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [INFORMATION]: Cartesian input grid
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_grid: Passed ID = 0 and mode = 131074
grdtrack [INFORMATION]: Reading grid from file distance.grd
grdtrack [DEBUG]: Calling nc_open on distance.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: packed z-range: [0,7.07107]
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [INFORMATION]: Cartesian input grid
grdtrack [DEBUG]: Chosen boundary condition for all edges: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for all edges: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for left edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for right edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for bottom edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for top edge: natural
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: Found readable file distance-sqrt.grd
grdtrack [DEBUG]: Replace file distance-sqrt.grd with path distance-sqrt.grd
grdtrack [DEBUG]: Found readable file distance-sqrt.grd
grdtrack [DEBUG]: Replace file distance-sqrt.grd with path distance-sqrt.grd
grdtrack [DEBUG]: Found readable file distance-sqrt.grd
grdtrack [DEBUG]: Object ID 1 : Registered Grid File distance-sqrt.grd as an Input resource with geometry Surface [n_objects = 2]
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_grid: Passed ID = 1 and mode = 131073
grdtrack [DEBUG]: Found readable file distance-sqrt.grd
grdtrack [DEBUG]: Calling nc_open on distance-sqrt.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [DEBUG]: Calling nc_open on distance-sqrt.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [INFORMATION]: Cartesian input grid
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_grid: Passed ID = 1 and mode = 131074
grdtrack [INFORMATION]: Reading grid from file distance-sqrt.grd
grdtrack [DEBUG]: Calling nc_open on distance-sqrt.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: packed z-range: [0,2.65915]
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [INFORMATION]: Cartesian input grid
grdtrack [DEBUG]: Chosen boundary condition for all edges: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for all edges: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for left edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for right edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for bottom edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for top edge: natural
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: Found readable file distance-squared.grd
grdtrack [DEBUG]: Replace file distance-squared.grd with path distance-squared.grd
grdtrack [DEBUG]: Found readable file distance-squared.grd
grdtrack [DEBUG]: Replace file distance-squared.grd with path distance-squared.grd
grdtrack [DEBUG]: Found readable file distance-squared.grd
grdtrack [DEBUG]: Object ID 2 : Registered Grid File distance-squared.grd as an Input resource with geometry Surface [n_objects = 3]
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_grid: Passed ID = 2 and mode = 131073
grdtrack [DEBUG]: Found readable file distance-squared.grd
grdtrack [DEBUG]: Calling nc_open on distance-squared.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [DEBUG]: Calling nc_open on distance-squared.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [INFORMATION]: Cartesian input grid
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_grid: Passed ID = 2 and mode = 131074
grdtrack [INFORMATION]: Reading grid from file distance-squared.grd
grdtrack [DEBUG]: Calling nc_open on distance-squared.grd, ncid = 65536, err = 0
grdtrack [DEBUG]: packed z-range: [0,50]
grdtrack [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdtrack [INFORMATION]: Cartesian input grid
grdtrack [DEBUG]: Chosen boundary condition for all edges: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for all edges: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for left edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for right edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for bottom edge: natural
grdtrack [INFORMATION]: gmt_grd_BC_set: Set boundary condition for top edge: natural
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: gmtapi_init_import: Passed family = Data Table and geometry = Point
grdtrack [DEBUG]: gmtapi_init_import: Added 0 new sources
grdtrack [DEBUG]: Object ID 3 : Registered Data Table Stream 7fa661497aa0 as an Input resource with geometry Point [n_objects = 4]
grdtrack [DEBUG]: gmtapi_init_import: Added stdin to registered sources
grdtrack [DEBUG]: GMT_Init_IO: Returned first Input object ID = 3
grdtrack [DEBUG]: GMT_Begin_IO: Mode value 1 not considered (ignored)
grdtrack [DEBUG]: GMT_Begin_IO: Initialize record-by-record access for Input
grdtrack [DEBUG]: gmtapi_next_io_source: Selected object 3
grdtrack [INFORMATION]: Reading Data Table from Standard Input stream
grdtrack [DEBUG]: GMT_Begin_IO: Input resource access is now enabled [record-by-record]
grdtrack [DEBUG]: gmtapi_init_export: Passed family = Data Table and geometry = Point
grdtrack [DEBUG]: Object ID 4 : Registered Data Table Stream 7fa661498780 as an Output resource with geometry Point [n_objects = 5]
grdtrack [DEBUG]: gmtapi_init_export: Added stdout to registered destinations
grdtrack [DEBUG]: GMT_Init_IO: Returned first Output object ID = 4
grdtrack [DEBUG]: GMT_Begin_IO: Mode value 1 not considered (ignored)
grdtrack [DEBUG]: GMT_Begin_IO: Initialize record-by-record access for Output
grdtrack [DEBUG]: gmtapi_next_io_source: Selected object 4
grdtrack [INFORMATION]: Writing Data Table to Standard Output stream
grdtrack [DEBUG]: GMT_Begin_IO: Output resource access is now enabled [record-by-record]
grdtrack [DEBUG]: Source col types: (Number,Number)
grdtrack [DEBUG]: ASCII source scanned: Numerical columns: 2, Trailing text: N, Record type: Numerical only
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdtrack [DEBUG]: GMT_End_IO: Output resource access is now disabled
grdtrack [INFORMATION]: Sampled 1 points from grid distance.grd (101 x 101)
grdtrack [DEBUG]: GMT_Destroy_Data: freed memory for a Grid for object 0
grdtrack [DEBUG]: gmtlib_unregister_io: Unregistering object no 0 [n_objects = 4]
grdtrack [DEBUG]: gmtlib_unregister_io: Object no 0 has non-NULL resource pointer
grdtrack [INFORMATION]: Sampled 1 points from grid distance-sqrt.grd (101 x 101)
grdtrack [DEBUG]: GMT_Destroy_Data: freed memory for a Grid for object 1
grdtrack [DEBUG]: gmtlib_unregister_io: Unregistering object no 1 [n_objects = 3]
grdtrack [DEBUG]: gmtlib_unregister_io: Object no 1 has non-NULL resource pointer
grdtrack [INFORMATION]: Sampled 1 points from grid distance-squared.grd (101 x 101)
grdtrack [DEBUG]: GMT_Destroy_Data: freed memory for a Grid for object 2
grdtrack [DEBUG]: gmtlib_unregister_io: Unregistering object no 2 [n_objects = 2]
grdtrack [DEBUG]: gmtlib_unregister_io: Object no 2 has non-NULL resource pointer
grdtrack [DEBUG]: gmtlib_unregister_io: Unregistering object no 3 [n_objects = 1]
grdtrack [DEBUG]: gmtlib_unregister_io: Unregistering object no 4 [n_objects = 0]
gmt [DEBUG]: Entering GMT_Destroy_Session

```

gmt 6.6.0 crashed, `results` empty, `gmt grdtrack -Vd`:

```auto
gmt [DEBUG]: GMT_Create_Session: Terminal width = 80
gmt [DEBUG]: Obtained the ppid from parent: 2859999
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /home/mkononets/miniforge3/envs/gmt/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /home/mkononets
gmt [DEBUG]: GMT->session.USERDIR = /home/mkononets/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /home/mkononets/.gmt/cache [created]
gmt [DEBUG]: GMT: 0. Will try to find subdir=postscriptlight stem = PSL_custom_fonts suffix=.txt
gmt [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
gmt [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR /home/mkononets/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /home/mkononets/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /home/mkononets/miniforge3/envs/gmt/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. gmt_getsharepath trying SHAREDIR /home/mkononets/miniforge3/envs/gmt/share/gmt
gmt [DEBUG]: GMT: 6. gmt_getsharepath failed
gmt [DEBUG]: Map distance calculation will be Cartesian
gmt [DEBUG]: Exit: gmtinit_new_GMT_ctrl
gmt [DEBUG]: Enter: New_PSL_Ctrl
gmt [DEBUG]: Exit: New_PSL_Ctrl
gmt [DEBUG]: Enter: gmt_manage_workflow
gmt [DEBUG]: Exit : gmt_manage_workflow
gmt [DEBUG]: Enter: PSL_beginsession
gmt [DEBUG]: Exit : PSL_beginsession
gmt [DEBUG]: Enter: PSL_setdefaults
gmt [DEBUG]: Exit : PSL_setdefaults
gmt [DEBUG]: Enter: gmtlib_io_init
gmt [DEBUG]: Exit : gmtlib_io_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_reload_settings
gmt [DEBUG]: The PROJ_GEODESIC set to Vincenty
gmt [DEBUG]: Look for file /home/mkononets/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/cache/gmt.conf
gmt [DEBUG]: Could not find file gmt.conf
gmt [DEBUG]: Exit: gmt_reload_settings
gmt [DEBUG]: Enter: gmtlib_plot_C_format
gmt [DEBUG]: Exit: gmtlib_plot_C_format
gmt [DEBUG]: Enter: gmtinit_get_history
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Exit: gmtinit_get_history
gmt [DEBUG]: Initialize FFTW with 4 threads.
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Loading core GMT shared library: libgmt.so
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.so
gmt [DEBUG]: Loading GMT plugins from: /home/mkononets/miniforge3/envs/gmt/lib/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /home/mkononets/miniforge3/envs/gmt/lib/gmt/plugins/supplements.so
gmt [DEBUG]: Revised options: -G+lgridlist -Vd
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Replace file gridlist with path gridlist
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Replace file gridlist with path gridlist
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Object ID 0 : Registered Data Table File gridlist as an Input resource with geometry Volume [n_objects = 1]
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_dataset: Passed ID = 0 and mode = 0
grdtrack [INFORMATION]: Reading Data Table from File gridlist
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Calling nc_open on gridlist, ncid = 0, err = -51
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: gmtapi_import_dataset processed 0 resources
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
ERROR: Caught signal number 11 (Segmentation fault) at
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(+0x3635b4)[0x7f48fb34a5b4]
[0x0]
Stack backtrace:
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(gmt_sig_handler_unix+0xed)[0x7f48fb14f51d]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f48fadda520]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(+0x3635b4)[0x7f48fb34a5b4]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(GMT_grdtrack+0x28d)[0x7f48fb34b70d]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(GMT_Call_Module+0x615)[0x7f48fb0412b5]
gmt(+0x25c2)[0x562091fd65c2]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f48fadc1d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f48fadc1e40]
gmt(+0x3393)[0x562091fd7393]

```

gmt 6.5.0 crashed in a similar way, `results` empty, `gmt grdtrack -Vd`:

```auto
gmt [DEBUG]: GMT_Create_Session: Terminal width = 80
gmt [DEBUG]: Obtained the ppid from parent: 2857278
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /home/mkononets/miniforge3/envs/pygmt/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /home/mkononets
gmt [DEBUG]: GMT->session.USERDIR = /home/mkononets/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /home/mkononets/.gmt/cache [created]
gmt [DEBUG]: GMT: 0. Will try to find subdir=postscriptlight stem = PSL_custom_fonts suffix=.txt
gmt [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
gmt [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR /home/mkononets/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /home/mkononets/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /home/mkononets/miniforge3/envs/pygmt/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. gmt_getsharepath trying SHAREDIR /home/mkononets/miniforge3/envs/pygmt/share/gmt
gmt [DEBUG]: GMT: 6. gmt_getsharepath failed
gmt [DEBUG]: Map distance calculation will be Cartesian
gmt [DEBUG]: Exit: gmtinit_new_GMT_ctrl
gmt [DEBUG]: Enter: New_PSL_Ctrl
gmt [DEBUG]: Exit: New_PSL_Ctrl
gmt [DEBUG]: Enter: gmt_manage_workflow
gmt [DEBUG]: Exit : gmt_manage_workflow
gmt [DEBUG]: Enter: PSL_beginsession
gmt [DEBUG]: Exit : PSL_beginsession
gmt [DEBUG]: Enter: PSL_setdefaults
gmt [DEBUG]: Exit : PSL_setdefaults
gmt [DEBUG]: Enter: gmtlib_io_init
gmt [DEBUG]: Exit : gmtlib_io_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_reload_settings
gmt [DEBUG]: The PROJ_GEODESIC set to Vincenty
gmt [DEBUG]: Look for file /home/mkononets/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/cache/gmt.conf
gmt [DEBUG]: Could not find file gmt.conf
gmt [DEBUG]: Exit: gmt_reload_settings
gmt [DEBUG]: Enter: gmtlib_plot_C_format
gmt [DEBUG]: Exit: gmtlib_plot_C_format
gmt [DEBUG]: Enter: gmtinit_get_history
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Exit: gmtinit_get_history
gmt [DEBUG]: Initialize FFTW with 4 threads.
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Loading core GMT shared library: libgmt.so
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.so
gmt [DEBUG]: Loading GMT plugins from: /home/mkononets/miniforge3/envs/pygmt/lib/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /home/mkononets/miniforge3/envs/pygmt/lib/gmt/plugins/supplements.so
gmt [DEBUG]: Revised options: -G+lgridlist -Vd
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Replace file gridlist with path gridlist
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Replace file gridlist with path gridlist
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Object ID 0 : Registered Data Table File gridlist as an Input resource with geometry Volume [n_objects = 1]
grdtrack [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdtrack [DEBUG]: gmtapi_import_dataset: Passed ID = 0 and mode = 0
grdtrack [INFORMATION]: Reading Data Table from File gridlist
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: Calling nc_open on gridlist, ncid = 0, err = -51
grdtrack [DEBUG]: Found readable file gridlist
grdtrack [DEBUG]: gmtapi_import_dataset processed 0 resources
grdtrack [DEBUG]: GMT_End_IO: Input resource access is now disabled
ERROR: Caught signal number 11 (Segmentation fault) at
/home/mkononets/miniforge3/envs/pygmt/bin/../lib/libgmt.so.6(+0x34d0d4)[0x7fe60af700d4]
[0x0]
Stack backtrace:
/home/mkononets/miniforge3/envs/pygmt/bin/../lib/libgmt.so.6(gmt_sig_handler_unix+0xf0)[0x7fe60ad80700]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fe60aa16520]
/home/mkononets/miniforge3/envs/pygmt/bin/../lib/libgmt.so.6(+0x34d0d4)[0x7fe60af700d4]
/home/mkononets/miniforge3/envs/pygmt/bin/../lib/libgmt.so.6(GMT_grdtrack+0x28d)[0x7fe60af7134d]
/home/mkononets/miniforge3/envs/pygmt/bin/../lib/libgmt.so.6(GMT_Call_Module+0x58d)[0x7fe60ac7a50d]
gmt(main+0x58f)[0x55c0d87b45df]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7fe60a9fdd90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7fe60a9fde40]
gmt(+0x32fd)[0x55c0d87b52fd]

```

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [September 20, 2025, 11:59pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/6 "2025-09-20T23:59:08Z")

</div>

Yes and while there seems to be an issue, it worth noting the topic starter apparently does not hesitate demonstrating disrespect in a very relaxed, casual way.

Is somebody supposed to be waiting here to analyze his shiny example code written Monday morning? All that magnificent stack backtrace: “… libgmt.so.6 … libc.so.6 etc”?

---

<div class="post-metadata">

**Author:** ![mvanneste](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mvanneste](https://forum.generic-mapping-tools.org/u/mvanneste)\
**Post date:** [September 21, 2025, 9:27am UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/7 "2025-09-21T09:27:56Z")

</div>

Many thanks for looking into this and confirming the findings.  
I do apologize if my post was unclear or appearing to show disrespect, which is absolutely not what I meant. I simply observed something that potentially could be a bug, tried to illustrate this with a simple example, report on the type of error messages I am getting while realising that I am not deep enough in the code itself to find solutions myself. I am extremely grateful for the people supporting and developing GMT, which is a fantastic toolkit.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [September 21, 2025, 6:20pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/8 "2025-09-21T18:20:15Z")

</div>

OK, I read the post from phone and didn’t consult the history, but doing so I can see a post of mine asking to **not post long unix specific** scripts. If this had been done before maybe this issue had been _smoothed_ out before version 6.6.0. And in fact this case can be shown in **three lines only**.

Anyway, apart from the crash (fixed in #8798), this is not a bug, but instead a poor documented behavior. When docs say:

> … to pass a file whose first word in the trailing text record will be extracted as the file names.

it should add (it has it now)

> this means that file must have at least one numeric column before the text holding the grid names.

In summary, your `gridlist` must contain at least one numeric column. That is

```auto
0 distance.grd
0 distance-sqrt.grd
...

```

---

<div class="post-metadata">

**Author:** ![mvanneste](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mvanneste](https://forum.generic-mapping-tools.org/u/mvanneste)\
**Post date:** [September 21, 2025, 7:30pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/9 "2025-09-21T19:30:35Z")

</div>

Many thanks for the clarification! Much appreciated!

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [September 21, 2025, 8:36pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/10 "2025-09-21T20:36:13Z")

</div>

> [@Joaquim](#):
>
> this case can be shown in **three lines only**

I must say that’s not easy for some of us users at all! In my experience, a not-super-experienced user (like me) might be trying to solve some task. That fails so the user is trying to report their working environment with details.

To abandon that stance, that is, to switch the user’s mind from reporting a failed task to narrowing down the problem, may be quite a leap for that user.

With that I mean you’ll gonna have to remind us about this over and over again and I think it is pretty much unavoidable, and some will still be unable to do it on their own. That’s just how it things are with some of us, not-so-experienced users.

I don’t mind running lots of spaghetti user shell code in case it might help, under assumption the code can _actually_ be run (w/o lots of editing). This was not the case and it normally makes me super grumpy.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [September 21, 2025, 10:14pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/11 "2025-09-21T22:14:19Z")

</div>

This is the concept of MWE (Minimal Working Example), where we drop everything that is not related to the problem. For example, in current case everything related with plotting is irrelevant because the error occurred in `grdtrack` call that has nothing to do with plotting. Also, the problem was with a list file name, so a single file name is enough.

Summary

```auto
gmt grdmath -R-5/5/-5/5 -I.1 0 0 CDIST = distance.grd # No bloody unix $ please
echo distance.grd > list.txt # On unix one might need to wrap the name under quotes
echo 1 1 | gmt grdtrack -G+llist.grd

```

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [September 21, 2025, 10:16pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-issues-using-list-gmt6/4762/12 "2025-09-21T22:16:09Z")

</div>

> [@mkononets](#):
>
> under assumption the code can _actually_ be run (w/o lots of editing)

That is also extremely important and shorter is the example higher the guaranties that it will be true.
