Opened 13 years ago
Closed 13 years ago
Last modified 10 years ago
#3871 closed defect (fixed)
GDALGetOpenDatasets broken (1.7 and 1.8dev)
|Reported by:||warmerdam||Owned by:||warmerdam|
The method GDALDataset::GetOpenDatasets() is broken and returns a list of pointers to things that are *not* datasets. This bug was discovered in GDAL svn trunk and it also appears to exist in 1.7.
Change History (4)
comment:1 by , 13 years ago
|Status:||new → closed|
comment:2 by , 12 years ago
Actually, since the dataset handle was inserted into a hashlist at the time of GDAL 1.6.0. But to fix #2897, the dataset handle was not any longer inserted, but it was a structure instead (r16616). I realized a bit later that it broke GDALDumpOpenSharedDataset(), which was fixed in 16983. But I didn't realize that GDALDataset::GetOpenDatasets() was affected (as I think it isn't used by any GDAL utility, I didn't notice...) So GDAL 1.6.X where X >=1 is also affected and your fix would be theoretically necessary there too.
After closer review of all use of phAllDatasetSet in gdaldataset.cpp, after your fix, I'm pretty confident we're OK as far as the use of phAllDatasetSet is concerned.
comment:3 by , 12 years ago
Thanks Even - fix backported to 1.6 branch (r21212).
comment:4 by , 10 years ago
Milestone 1.7.4 deleted
Corrected in trunk (r21209) and 1.7 branch (r21210).
Basically I assume this function has been completely broken since things were reworked to use a hash list for the open dataset list. It is rarely used and so apparently no one has noticed.