#6552 closed defect (fixed)
GDALGridCreate() hangs with NULL or GDALDummyProgress functions.
Reported by: | Kyle Shannon | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.1 |
Component: | Algorithms | Version: | 2.1.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
GDALGridCreate() hangs when the pfnProgress isn't the term progress. Happens in trunk.
Reproduction:
#include "gdal_alg.h" int main() { double x[4] = {1, 2, 3, 4}; double y[4] = {1, 2, 3, 4}; double z[4] = {10, 20, 30, 40}; double g[25]; GDALDriverH hDrv = 0; GDALDatasetH hDS = 0; GDALRasterBandH hBand = 0; int rc = 0; GDALGridNearestNeighborOptions options; GDALAllRegister(); memset(&options, 0, sizeof(options)); options.dfNoDataValue = -1.0; /* ** Passing 0 as the pfnProgress also hangs (probably the same thing) ** Using GDALTermProgress runs fine. */ rc = GDALGridCreate(GGA_NearestNeighbor, &options, 4, x, y, z, 0, 5, 0, 5, 5, 5, GDT_Float64, g, GDALDummyProgress, 0); if(rc == CE_None) { hDrv = GDALGetDriverByName("GTiff"); hDS = GDALCreate(hDrv, "grid.tif", 5, 5, 1, GDT_Float64, 0); hBand = GDALGetRasterBand(hDS, 1); rc = GDALRasterIO(hBand, GF_Write, 0, 0, 5, 5, g, 5, 5, GDT_Float64, 0, 0); GDALFlushCache(hDS); GDALClose(hDS); } return rc; }
Change History (2)
comment:1 by , 8 years ago
Milestone: | 2.2.0 → 2.1.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | svn-trunk → 2.1.0 |
Note:
See TracTickets
for help on using tickets.
trunk r34392, branches/2.1 r34393 "GDALGridCreate(): fix hang in multi-threaded case when pfnProgress is NULL or GDALDummyProgress (#6552)"