Bug report #13061
Updated by Giovanni Manghi over 7 years ago
To reproduce start QGIS, run the following in Python Console and then close QGIS:
<pre>
from osgeo import gdal
inFilename = r"C:\\test.tif"
myImg = gdal.Open(inFilename, gdal.GA_ReadOnly)
myBand = myImg.GetRasterBand(1)
myData = myBand.ReadAsArray()
myData = None
myBand = None
myImg = None
</pre>
The crash happens around 90% of the time. The same happens when the code is run in a Processing script. If the data is not read (i.e. "myData = myBand.ReadAsArray()" is removed) the crash does not occur.
Tested on 64 OSGeo4W installation of QGIS 2.8.2, 2.10 and nightly (commit:f3fe29d) on a number of Windows 7 machines.
<pre>
from osgeo import gdal
inFilename = r"C:\\test.tif"
myImg = gdal.Open(inFilename, gdal.GA_ReadOnly)
myBand = myImg.GetRasterBand(1)
myData = myBand.ReadAsArray()
myData = None
myBand = None
myImg = None
</pre>
The crash happens around 90% of the time. The same happens when the code is run in a Processing script. If the data is not read (i.e. "myData = myBand.ReadAsArray()" is removed) the crash does not occur.
Tested on 64 OSGeo4W installation of QGIS 2.8.2, 2.10 and nightly (commit:f3fe29d) on a number of Windows 7 machines.