Opened 10 years ago
Closed 9 years ago
#5527 closed defect (worksforme)
Python interpreter crash upon exit having imported osgeo.gdal_array on Windows
Reported by: | wkarel | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | PythonBindings | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Having imported osgeo.gdal_array into a Python interpreter session, the interpreter crashes upon exit. The simplest program to reproduce the problem is:
python -c "import osgeo.gdal_array;print('hello')"
, which starts a new Python-session, prints "hello" to the console and then crashes, supposedly upon interpreter shutdown. Printing "hello" is not necessary to reproduce the crash, but it shows that gdal_array is loaded successfully, and the crash occurs upon unload/shutdown. The problem can just as well be reproduced in an interactive session or a minimal Python script that imports osgeo.gdal_array
Tested on different Windows versions and different GDAL installations / versions:
- Windows XP 32bit / OSGeo4W-Shell of QGis 2.2.0 (Python 2.7.4, GDAL 1.10.1, NumPy 1.5.1)
- Windows 7 64bit / OSGeo4W64Shell of QGis 2.2.0 (Python 2.7.5 64bit, GDAL 1.11.0, Numpy 1.8.1)
- Windows 7 64bit / Python 3.3.5 64bit installation with both self-compiled GDAL versions 1.10.1 and 1.11.0, Numpy 1.8.1
- Windows Server 2008 R2 / Python 2.7.6 64bit with self-compiled GDAL 1.10.1, Numpy 1.8.0
The Windows error messages differ according to the platform. On Windows XP, it says that an instruction referred to a memory address that could not be written to. On Windows 7, the error just says that python.exe stopped working.
Cheers, Willi.
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Based on Jukka's input, closing.
I made a test with Windows 7, 64-bit and GDAL 1.11.1, released 2014/09/24 OSGeo4W command window is launched from
"C:\Program Files (x86)\QGIS Brighton\OSGeo4W.bat"
Your test command just prints hello on the screen and stops without any error messages.
I would say "works for me" but I do not close the ticket before knowing if is works for some others as well.