Hi, With the release of gdal 3.4.2, gdalbuildvrt seems to have a bug when selecting image bands. It works OK when band 1 is specified but if other band(s) in the image are used without band 1 then it seg faults. I noticed there were some changes around checking bands in the release notes "change logic to check homogenous number of bands” and I had a quick look at the commits but cannot see where this is occurring.
# Works: gdalbuildvrt test.vrt sen2_20210527_aber_subset.kea -b 1 # Seg Faults: gdalbuildvrt test.vrt sen2_20210527_aber_subset.kea -b 2 ERROR 5: sen2_20210527_aber_subset.kea: GDALDataset::GetRasterBand(2) - Illegal band # Segmentation fault (core dumped) # Works: gdalbuildvrt test.vrt sen2_20210527_aber_subset.kea -b 1 -b 2 -b 3 # Seg Faults: gdalbuildvrt test.vrt sen2_20210527_aber_subset.kea -b 2 -b 3 -b 4 ERROR 5: sen2_20210527_aber_subset.kea: GDALDataset::GetRasterBand(4) - Illegal band # Segmentation fault (core dumped) Note, the input image I was using has 10 bands and these commands work with 3.4.1. I get the same seg fault on Mac, Linux and Windows ("Windows fatal exception: access violation"). Many thanks, Pete _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev