Ticket #1718 (closed defect: fixed)
OSR ExportToProj4 causes a setfault with an empty reference
| Reported by: | hobu | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.3 |
| Component: | OGR_SRS | Version: | svn-trunk |
| Severity: | normal | Keywords: | proj4 |
| Cc: | mloskot |
Description (last modified by hobu) (diff)
import osr
ref = osr.SpatialReference()
# download some junk
ref.SetFromUserInput('http://spatialreference.org/user/6')
# no problem here
print ref.ExportToWkt()
# goes splat here
print ref.ExportToProj4()
0x024f48b9 in OGR_SRSNode::GetValue (this=0x0) at /Users/hobu/svn/gdal/ogr/ogr_spatialref.h:90
90 const char *GetValue() const { return pszValue; }
(gdb) bt
#0 0x024f48b9 in OGR_SRSNode::GetValue (this=0x0) at /Users/hobu/svn/gdal/ogr/ogr_spatialref.h:90
#1 0x0236d764 in OGRSpatialReference::exportToProj4 (this=0x30b870, ppszProj4=0xbffff518) at ogr_srs_proj4.cpp:957
#2 0x023730e1 in OSRExportToProj4 (hSRS=0x30b870, ppszReturn=0xbffff518) at ogr_srs_proj4.cpp:919
#3 0x0020c324 in _wrap_SpatialReference_ExportToProj4 (args=0x79f50) at osr_wrap.cpp:3271
#4 0x97eb67fe in PyObject_Call ()
#5 0x97f07450 in _PyEval_SliceIndex ()
#6 0x97f08a98 in PyEval_EvalCodeEx ()
#7 0x97f06f6d in _PyEval_SliceIndex ()
#8 0x97f08a98 in PyEval_EvalCodeEx ()
#9 0x97f08bbb in PyEval_EvalCode ()
#10 0x97f21dc5 in PyErr_Display ()
#11 0x97f2395a in PyRun_SimpleFileExFlags ()
#12 0x97f2b42b in Py_Main ()
#13 0x00001f8e in start ()
Current language: auto; currently c++
Change History
Note: See
TracTickets for help on using
tickets.
