grdfill fails, probably in situation where holes extend to the edge of the grid domain
Maintainers usually reply within 1 day
@PaulWessel is already working on this.
Since Aug 18, 2023.
Assessment
This issue has not been assessed yet.
Description
I have found that grdfill is failing, running into a segmentation fault. I am running gmt 6.4.0 on MacOS. It fails when trying to do certain operations on a grid which has lots of nans running up against the edge of the grid. It fails when using -L and -Ac but not -An. (I have not tried other options)
Command that creates failure: (the file D20191226.nc can be found here: https://drive.google.com/file/d/1rDbvuEidaeIdsuik0O7kSReNcsjzoVt2/view?usp=sharing)
gmt grdfill D20191226.nc -Ac -GD20191226_HOLESFILLED.nc -Vd
Full error message
gmt [DEBUG]: GMT_Create_Session: Terminal width = 122
gmt [DEBUG]: Obtained the ppid from parent: 36863
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /Users/mlees/.conda/envs/general_science/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /Users/mlees
gmt [DEBUG]: GMT->session.USERDIR = /Users/mlees/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /Users/mlees/.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 /Users/mlees/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /Users/mlees/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /Users/mlees/.conda/envs/general_science/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. gmt_getsharepath trying SHAREDIR /Users/mlees/.conda/envs/general_science/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 /Users/mlees/gmt.conf
gmt [DEBUG]: Look for file /Users/mlees/.gmt/gmt.conf
gmt [DEBUG]: Look for file /Users/mlees/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /Users/mlees/.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 8 threads.
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Loading core GMT shared library: libgmt.dylib
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.dylib
gmt [DEBUG]: Loading GMT plugins from: /Users/mlees/.conda/envs/general_science/lib/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /Users/mlees/.conda/envs/general_science/lib/gmt/plugins/supplements.so
gmt [DEBUG]: Revised options: D20191226.nc -Ac0.0 -GD20191226_HOLESFILLED.nc -Vd
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with path D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with D20191226.nc
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with path D20191226.nc
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with path D20191226.nc
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Object ID 0 : Registered Grid File D20191226.nc as an Input resource with geometry Surface [n_objects = 1]
grdfill [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdfill [DEBUG]: gmtapi_import_grid: Passed ID = 0 and mode = 1
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Calling nc_open on D20191226.nc, ncid = 65536, err = 0
grdfill [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdfill [DEBUG]: Calling nc_open on D20191226.nc, ncid = 65536, err = 0
grdfill [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdfill [DEBUG]: Call gmtgrdio_doctor_geo_increments on a geographic grid
grdfill [DEBUG]: Geographic input grid, longitudes span less than 360
grdfill [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdfill [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdfill [DEBUG]: gmtapi_import_grid: Passed ID = 0 and mode = 2
grdfill [INFORMATION]: Reading grid from file D20191226.nc
grdfill [DEBUG]: Calling nc_open on D20191226.nc, ncid = 65536, err = 0
grdfill [DEBUG]: packed z-range: [-0.179119,0.0716667]
grdfill [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdfill [DEBUG]: Geographic input grid, longitudes span less than 360
grdfill [DEBUG]: Chosen boundary condition for all edges: geographic
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for all edges: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for left edge: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for right edge: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for bottom edge: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for top edge: natural
grdfill [DEBUG]: GMT_End_IO: Input resource access is now disabled
Segmentation fault: 11
- Dominant language
- C
- Stars
- 997
- Forks
- 420
- Avg merge
- 13h 27m
- Merged PRs (30d)
- 47
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenericMappingTools/gmt
-
Add support for SCM 9.0.0 to GMTPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
GenericMappingTools/gmt#9316 · 10 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GenericMappingTools/gmt#5767 · 15 comments ·
Maintainers usually reply within 1 day
-
discussion
Difficulty 5/5 Over a week Newbie friendliness 35/100
GenericMappingTools/gmt#9343 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
GenericMappingTools/gmt#9331 · 1 reaction ·
Maintainers usually reply within 1 day
-
histogram: the min/max setting in -T is ignored when -R is setPossibly taken @seisman claimed this 1 day ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
GenericMappingTools/gmt#9330 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in GenericMappingTools/gmt
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
espressif/esp-iot-solution#856 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Broken links in reference manualPossibly taken @farisbasha claimed this 14 days ago. Opencore:meson
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mpv-player/mpv#18934 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100