artemp/trac2github — Issue #659: Segfault in proj4 when projecting Envelopes
Author: artemp
Created: 2011-10-09 20:45:52+00:00
State: open
Labels: Core_Library

This crashes in both Mapnik 0.7.x and Mapnk2, and both proj47 and proj trunk

{{{
#!python
from mapnik2 import *
tr = ProjTransform(Projection('+init=epsg:4326'),Projection('+init=esri:102067'))
tr.forward(Envelope(11.025648,46.918073,19.739145,51.689377))
}}}

But this does not:

{{{
#!python
from mapnik2 import *
from_ = Projection('+init=epsg:4326')
to_ = Projection('+init=esri:102067')
tr = ProjTransform(from_,to_)
tr.forward(Envelope(11.025648,46.918073,19.739145,51.689377))
}}}

backtrace
{{{
#!sh
Process: Python [51234]
Path: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [50349]

Date/Time: 2010-11-05 15:22:32.113 -0700
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6

Interval Since Last Report: 1199496 sec
Crashes Since Last Report: 85
Per-App Crashes Since Last Report: 137
Anonymous UUID: CDCA5744-BE4E-4C7D-883F-48B64BEFFD2B

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000010069001b
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ???	0x000000010069001b 0 + 4301848603
1 libproj.0.dylib	0x00000001007bf9a7 pj_transform + 1543
2 libmapnik2.dylib	0x0000000101961a47 mapnik::proj_transform::forward(double&, double&, double&) const + 135
3 _mapnik2.so	0x00000001010a7879 (anonymous namespace)::forward_transform_env(mapnik::proj_transform&, mapnik::box2d const&) + 105
4 _mapnik2.so	0x00000001010a7dba boost::python::detail::caller_arity<2u>::impl (*)
}}}