Opened 17 years ago

Last modified 17 years ago

#1718 closed defect

OSR ExportToProj4 causes a setfault with an empty reference — at Version 1

Reported by: hobu Owned by: warmerdam
Priority: normal Milestone: 1.4.3
Component: OGR_SRS Version: svn-trunk
Severity: normal Keywords: proj4
Cc: Mateusz Łoskot

Description (last modified by hobu)

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 (1)

comment:1 by hobu, 17 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.