artemp/mapnik — Issue #565: segfault when on osx when compiled with clang++ as exceptions are somehow not handled properly
Author: artemp
Created: 2011-10-11 16:25:53+00:00
State: open
Labels: Boost_Python_Binding

Lastest trunk on osx 10.6, with boost trunk compiled with g++, and mapnik compiled with clang++ (trunk) segfaults during the python tests.

I can isolate it down to the glyph_symbolizer test:

$ nik2img.py tests/data/good_maps/glyph_symbolizer.xml crash.png
Segmentation fault

with mapnik compiled with g++ i see the error is actually a runtime error that is not being caught by boost python:

{{{
======================================================================
ERROR: python_tests.glyph_symbolizer_test.test_load_save_load_map
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/nose-0.11.1-py2.6.egg/nose/case.py", line 183, in runTest
self.test(*self.arg)
File "/Users/dane/projects/mapnik-dev/trunk2/tests/python_tests/glyph_symbolizer_test.py", line 45, in test_load_save_load_map
mapnik2.load_map(map, in_map)
RuntimeError: Failed to parse attribute 'halo_fill'. Expected type color but got 'rgba(0%,0%,0%,4%)' in GlyphSymbolizer in style 'arrows' in map '../data/good_maps/glyph_symbolizer.xml')
}}}

So, basically mapnik now crashes rather than throwing a python exception... this is just the first error it hit during the tests:

Full crash:
{{{
Process: Python [47962]
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 [47780]

PlugIn Path: /Library/Python/2.6/site-packages/mapnik2/_mapnik2.so
PlugIn Identifier: _mapnik2.so
PlugIn Version: ??? (???)

Date/Time: 2010-06-28 18:37:16.286 -0700
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6

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

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 _mapnik2.so	0x00000001012ef006 translator(mapnik::config_error const&) + 22
1 _mapnik2.so	0x00000001012f66df boost::python::detail::translate_exception::operator()(boost::python::detail::exception_handler const&, boost::function0 const&, void (*)(mapnik::config_error const&)) const + 79
2 _mapnik2.so	0x00000001012f667d boost::detail::function::function_obj_invoker2, boost::_bi::list3, boost::arg<2>, boost::_bi::value > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) + 13
3 libboost_python.dylib	0x000000010213451b boost::python::handle_exception_impl(boost::function0) + 155 (function_template.hpp:1013)
4 libboost_python.dylib	0x0000000102129fce function_call + 78 (function_template.hpp:854)
5 org.python.python	0x000000010000aff3 PyObject_Call + 112
6 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
7 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
8 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
9 org.python.python	0x000000010000aff3 PyObject_Call + 112
10 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
11 org.python.python	0x00000001000892e1 PyEval_EvalFrameEx + 15663
12 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
13 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
14 org.python.python	0x000000010000aff3 PyObject_Call + 112
15 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
16 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
17 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
18 org.python.python	0x000000010000aff3 PyObject_Call + 112
19 org.python.python	0x000000010001a9df PyClass_New + 1575
20 org.python.python	0x000000010000aff3 PyObject_Call + 112
21 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
22 org.python.python	0x000000010000aff3 PyObject_Call + 112
23 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
24 org.python.python	0x00000001000892e1 PyEval_EvalFrameEx + 15663
25 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
26 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
27 org.python.python	0x000000010000aff3 PyObject_Call + 112
28 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
29 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
30 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
31 org.python.python	0x000000010000aff3 PyObject_Call + 112
32 org.python.python	0x000000010001a9df PyClass_New + 1575
33 org.python.python	0x000000010000aff3 PyObject_Call + 112
34 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
35 org.python.python	0x000000010000aff3 PyObject_Call + 112
36 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
37 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
38 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
39 org.python.python	0x000000010000aff3 PyObject_Call + 112
40 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
41 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
42 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
43 org.python.python	0x000000010000aff3 PyObject_Call + 112
44 org.python.python	0x000000010001a9df PyClass_New + 1575
45 org.python.python	0x000000010000aff3 PyObject_Call + 112
46 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
47 org.python.python	0x000000010000aff3 PyObject_Call + 112
48 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
49 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
50 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
51 org.python.python	0x000000010000aff3 PyObject_Call + 112
52 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
53 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
54 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
55 org.python.python	0x000000010000aff3 PyObject_Call + 112
56 org.python.python	0x000000010001a9df PyClass_New + 1575
57 org.python.python	0x000000010000aff3 PyObject_Call + 112
58 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
59 org.python.python	0x000000010000aff3 PyObject_Call + 112
60 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
61 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
62 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
63 org.python.python	0x000000010000aff3 PyObject_Call + 112
64 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
65 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
66 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
67 org.python.python	0x000000010000aff3 PyObject_Call + 112
68 org.python.python	0x000000010001a9df PyClass_New + 1575
69 org.python.python	0x000000010000aff3 PyObject_Call + 112
70 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
71 org.python.python	0x000000010000aff3 PyObject_Call + 112
72 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
73 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
74 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
75 org.python.python	0x000000010000aff3 PyObject_Call + 112
76 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
77 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
78 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
79 org.python.python	0x000000010000aff3 PyObject_Call + 112
80 org.python.python	0x000000010001a9df PyClass_New + 1575
81 org.python.python	0x000000010000aff3 PyObject_Call + 112
82 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
83 org.python.python	0x000000010000aff3 PyObject_Call + 112
84 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
85 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
86 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
87 org.python.python	0x000000010000aff3 PyObject_Call + 112
88 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
89 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
90 org.python.python	0x000000010002c8e1 PyClassMethod_New + 1748
91 org.python.python	0x000000010000aff3 PyObject_Call + 112
92 org.python.python	0x000000010001a9df PyClass_New + 1575
93 org.python.python	0x000000010000aff3 PyObject_Call + 112
94 org.python.python	0x0000000100051f0e _PyType_Lookup + 6095
95 org.python.python	0x000000010000aff3 PyObject_Call + 112
96 org.python.python	0x000000010008a51a PyEval_EvalFrameEx + 20328
97 org.python.python	0x00000001000892e1 PyEval_EvalFrameEx + 15663
98 org.python.python	0x00000001000892e1 PyEval_EvalFrameEx + 15663
99 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
100 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
101 org.python.python	0x000000010000aff3 PyObject_Call + 112
102 org.python.python	0x000000010001a9df PyClass_New + 1575
103 org.python.python	0x000000010000aff3 PyObject_Call + 112
104 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
105 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
106 org.python.python	0x000000010002c88f PyClassMethod_New + 1666
107 org.python.python	0x000000010000aff3 PyObject_Call + 112
108 org.python.python	0x000000010001a9df PyClass_New + 1575
109 org.python.python	0x000000010000aff3 PyObject_Call + 112
110 org.python.python	0x0000000100051b80 _PyType_Lookup + 5185
111 org.python.python	0x0000000100053b7c PyType_GenericAlloc + 3332
112 org.python.python	0x000000010000aff3 PyObject_Call + 112
113 org.python.python	0x000000010008a54e PyEval_EvalFrameEx + 20380
114 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
115 org.python.python	0x000000010008935e PyEval_EvalFrameEx + 15788
116 org.python.python	0x00000001000892e1 PyEval_EvalFrameEx + 15663
117 org.python.python	0x000000010008acce PyEval_EvalCodeEx + 1803
118 org.python.python	0x000000010008ad61 PyEval_EvalCode + 54
119 org.python.python	0x00000001000a265a Py_CompileString + 78
120 org.python.python	0x00000001000a2723 PyRun_FileExFlags + 150
121 org.python.python	0x00000001000a423d PyRun_SimpleFileExFlags + 704
122 org.python.python	0x00000001000b0286 Py_Main + 2718
123 org.python.python.app	0x0000000100000e6c start + 52
}}}