You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GeoTIFF driver produces an Access Violation when reading from a network drive and the connection is lost. This only happens when VSI_CACHE=TRUE. When VSI_CACHE=FALSE, the reading fails, but there is no Access Violation.
My hypothesis is that in cpl_vsi_cache.cpp there are many calls to "poBase->Seek" and "poBase->Read" that do not check if there is an error in the underlying calls.
Steps to reproduce the problem.
1 - Open a big enough GeoTIFF in a network share.
2 - Disconnect the network.
3 - Do several reads from random parts of the file.
4 - Access Violation
Many thanks Rouault!!
I still have a doubt: In the VSICachedFile::LoadBlocks method, line 304 there is an unchecked poBase->Seek. Wouldn't it be necessary to check it as it is done in the call to poBase->Seek on line 343? I don't know the code well, so I don't know if the check is necessary.
I still have a doubt: In the VSICachedFile::LoadBlocks method, line 304 there is an unchecked poBase->Seek.
I've just added a check for consistency, but I believe I've never seen a Seek() failing (seeking beyond the extent of a file is a valid operation for example)
Expected behavior and actual behavior.
The GeoTIFF driver produces an Access Violation when reading from a network drive and the connection is lost. This only happens when VSI_CACHE=TRUE. When VSI_CACHE=FALSE, the reading fails, but there is no Access Violation.
My hypothesis is that in cpl_vsi_cache.cpp there are many calls to "poBase->Seek" and "poBase->Read" that do not check if there is an error in the underlying calls.
Steps to reproduce the problem.
1 - Open a big enough GeoTIFF in a network share.
2 - Disconnect the network.
3 - Do several reads from random parts of the file.
4 - Access Violation
Operating system
Windows 10 Pro x64
GDAL version and provenance
GDAL 3.2.0 from https://www.gisinternals.com/
The text was updated successfully, but these errors were encountered: