Hi, using GMT master (updated today) I’m getting a malloc() error when using grdview with a draped 3-band GeoTIFF image. I don’t get an error when I use -C to color the DEM using a CPT file, and I also don’t get an error if I split my GeoTiff image into red, green, blue TIFFs first. I imagine this error could be related to the malloc() error in grdimage that was recently fixed?(Getting malloc errors with grdimage of GeoTIFF in oblique Mercator projection(-JOa))
gmt --version
6.4.0_d8429f0_2022.02.20
gmt grdview profiles/P_IR_grid3_newgrid.tif -Gprofiles/P_IR_grid3_colored_hillshade.tif -p -Qi300 -R -J -JZ -O >> profiles/P_IR_profile.ps
gmt(31096,0x10f9a4dc0) malloc: can’t allocate region
:*** mach_vm_map(size=18446744073709514752, flags: 100) failed (error code=3)
gmt(31096,0x10f9a4dc0) malloc: *** set a breakpoint in malloc_error_break to debug
grdview [ERROR]: gdalread: failure to allocate enough memory
grdview [ERROR]: ERROR reading image with gdalread.
grdview (gmtapi_import_image): Could not read from file [profiles/P_IR_grid3_colored_hillshade.tif]
[Session gmt (0)]: Error returned from GMT API: GMT_IMAGE_READ_ERROR (22)
[Session gmt (0)]: Error returned from GMT API: GMT_IMAGE_READ_ERROR (22)
These commands work without a problem:
gmt grdview profiles/P_IR_grid3_newgrid.tif -Cgeo -p -Qi300 -R -J -JZ -O >> profiles/P_IR_profile.ps
gmt grdview profiles/P_IR_grid3_newgrid.tif -Gprofiles/P_IR_grid3_red.tif -Gprofiles/P_IR_grid3_green.tif -Gprofiles/P_IR_grid3_blue.tif -p -Qi300 -R -J -JZ -O >> profiles/P_IR_profile.ps
Cheers,
Kyle