-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault under Ubuntu 10.04 #13
Comments
It is normal, that program uses shared libs 42 and 48 boost versions? $ ldd ~/src/carto-generator/example |
looks fine. the only The crashing bit is in spirit's karma, which is header only, so it will not show up in the ldd output. Perhaps your mapnik is compiled against a different set of boost headers? |
yes |
i recompile all with correct version: $ ldd ./example top of gdb stack: Program received signal SIGSEGV, Segmentation fault. |
I haven't upgraded to 1.48 yet on my systems, I'll try it this week on OSX and Ubuntu 11.10 and see if I can replicate this. |
@wDevil did you compile with clang or gcc? |
@rcoup gcc $ gcc --version |
I can replicate crashes as well, using either g++ or clang++ with boost 1.48. But, it may be because I'm trying to get things working with mapnik master. If I get farther I will push my changes for @rundel to review. |
@springmeyer @wDevil @rcoup try the newest version and let me know if there are still segfaults. |
$ ./xml2carto ./tests/map.xml ./map.mml $ git show
And last version of mapnik:
$ ldd ./xml2carto $ ldd /usr/local/lib/libmapnik.so.2.0 $ gdb ./xml2carto Program received signal SIGSEGV, Segmentation fault. $ ./xml2carto --xml ./tests/map.xml ./map.mml Maybe i forget something?
|
I'm pretty sure this isn't related to the TextSymbolizer changes. One of the earlier crashlogs shows this message There are no good docs about the user side yet, some (unfinished) docs about the internal workings are available here: |
@herm Thank you, all of the information is immensely helpful. I'll look more into other potential causes, get_name was the only deprecated function I had looked at since it now just returns an empty expression_ptr. @springmeyer Do any of these improvements have an accepted carto syntax yet? |
@rundel - not sure, would need a closer look. I'm out of the office until next week - awesome job getting things updated. Though things still appear to crash for me:
Also I think you need this mod to the makefile: diff --git a/Makefile b/Makefile
index deed072..5e5ae51 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ CXX = clang++
CXXFLAGS = -I./include $(shell mapnik-config --cflags) -DMAPNIKDIR=\"$(shell ma
-LIBS = $(shell mapnik-config --libs --dep-libs) -lboost_program_options
+LIBS = $(shell mapnik-config --libs --ldflags --dep-libs) -lboost_program_optio
SRC = $(wildcard *.cpp)
|
@wDevil just pushed a couple of small fixes. I still can't replicate the segfault you and Dane are seeing, so I'm not sure if these will fix it. @springmeyer if you are still seeing the segfault can you post the tail of the backtrace? |
$ git pull $ make clean $ ./xml2carto ./tests/map.xml ./map.mml WARNING: Using 'name' in TextSymbolizer/ShieldSymbolizer is deprecated!Segmentation fault gdb output: git://gist.github.com/1726195.git |
@wDevil I've pushed three subset xml test files can you try the following: ./xml2carto ./tests/map_line.xml map.mml and let me know which are segfaulting? |
@rundel WARNING: Using 'name' in TextSymbolizer/ShieldSymbolizer is deprecated!Ошибка сегментирования WARNING: Using 'name' in TextSymbolizer/ShieldSymbolizer is deprecated!Ошибка сегментирования All of them :( |
@wDevil Hm, I am stumped. Are mapnik and xml2carto compiled with debug symbols? If not can you recompile and then repost a gist of the gdb backtrace for map.xml? |
@rundel compiling.... |
@rundel done - git://gist.github.com/1726624.git |
@wDevil is that the full backtrace? It seems like some of the stack is missing. |
@rundel full backtrace git://gist.github.com/1728845.git |
@rundel backtrace is ok? it's helped you? |
@wDevil backtrace is complete but it is almost impossible to sort through the Boost mess to find the exact cause. I'm hoping @springmeyer would be able to test the newest revision to see if he is also seeing the segfault. |
@rundel on which revision of mapnik20 carto-generator was tested? i'll try to find mac for compiling and convert styles. |
@wDevil I'm currently working with a week old revision from the master branch (1e2897b28d003bb013f2bde2f4453f872b913b5a) to be exact. Are you working with the master or 2.0.x branch? |
Yep, also seeing segfaults still.
|
@rundel with master branch(e4f7f10) commit e4f7f1074a6cc9b668b0c62b43555fc6f18f73d8 7 days ago revision |
Hm, my working build is on Ubuntu 11.10, I'll try building on my Laptop to see what happens under OSX 10.7 |
@rundel what versions of: can you comment output of commands: |
@wDevil libboost is 1.48 compiled from source with gcc 4.6.1, libicu is 4.4 installed by apt. Library ldd info is at https://gist.github.com/1762299 |
osx 10.7 and clang++ here, tried both boost 1.48 and trunk. Here is an example crash:
|
Finally got everything compiled on OSX 10.7 with clang++ 3.0 and boost 1.48 and I still dont see the segfault.
|
I'm still seeing the segfault. I've narrowed it down to an XML with only a
And the backtrace looks like: https://gist.github.com/2117624 |
Hmm, correction, it looks like all I had to do to generate a crash in release (-DNDEBUG) was add a <?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" background-color="rgb(255,255,255)">
<Style name="provlines">
<Rule>
<LineSymbolizer />
</Rule>
</Style>
<Layer name="Provincial borders" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>provlines</StyleName>
<Datasource>
<Parameter name="file">data/boundaries_l</Parameter>
<Parameter name="type">shape</Parameter>
</Datasource>
</Layer>
</Map> |
When I remove the |
@springmeyer I think I've fixed your particular bug. Issue was one of the map_data attributes not being properly marked as optional in the karma grammar. Let me know if it is working for you now. |
@rundel - awesome. I don't however see a commit - do you still need to push? |
Forgot to push, should be there now. @springmeyer |
sweet, that fixed it! |
Boost version: 1.48 build from src.
Try to parse test.xml from folder test in carto-generator project and have segfault:
$ ~/src/carto-generator/example ~/src/carto-generator/tests/test.xml ./test.mml
Segmentation fault
valgrind output: https://gist.github.com/567dd3ec2c2a65466f5f
head of trace from gdb:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73fc05f in std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
#0 0x00007ffff73fc05f in std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
#1 0x00000000004b48e8 in bool boost::spirit::karma::rulestd::back_insert_iterator<std::string, std::string ()(), boost::spirit::unused_type, boost::spirit::unused_type, boost::spirit::unused_type>::generate<boost::spirit::context<boost::fusion::cons<cssgen::map_data const&, boost::fusion::nil>, boost::fusion::vector0 >, boost::spirit::unused_type, boost::optionalstd::string >(boost::spirit::karma::detail::output_iteratorstd::back_insert_iterator<std::string, mpl_::int_<15>, boost::spirit::unused_type>&, boost::spirit::context<boost::fusion::cons<cssgen::map_data const&, boost::fusion::nil>, boost::fusion::vector0 >&, boost::spirit::unused_type const&, boost::optionalstd::string const&) const (this=0x7fffffffd920, sink=..., delim=..., attr=...)
#2 0x00000000004b379b in bool boost::spirit::karma::referenceboost::spirit::karma::rule<std::back_insert_iterator<std::string, std::string ()(), boost::spirit::unused_type, boost::spirit::unused_type, boost::spirit::unused_type> const>::generateboost::spirit::karma::detail::output_iterator<std::back_insert_iterator<std::string, mpl_::int_<15>, boost::spirit::unused_type>, boost::spirit::context<boost::fusion::cons<cssgen::map_data const&, boost::fusion::nil>, boost::fusion::vector0 >, boost::spirit::unused_type, boost::optionalstd::string >(boost::spirit::karma::detail::output_iteratorstd::back_insert_iterator<std::string, mpl_::int_<15>, boost::spirit::unused_type>&, boost::spirit::context<boost::fusion::cons<cssgen::map_data const&, boost::fusion::nil>, boost::fusion::vector0 >&, boost::spirit::unused_type const&, boost::optionalstd::string const&) const (this=0x8ba358, sink=..., context=..., delim=..., attr=...) at /usr/local/include/boost/spirit/home/karma/reference.hpp:46
#3 0x00000000004b269e in bool boost::spirit::karma::omit_directiveboost::spirit::karma::reference<boost::spirit::karma::rule<std::back_insert_iterator<std::string, std::string ()(), boost::spirit::unused_type, boost::spirit::unused_type, boost::spirit::unused_type> const>, true>::generateboost::spirit::karma::detail::output_iterator<std::back_insert_iterator<std::string, mpl_::int_<15>, boost::spirit::unused_type>, boost::spirit::context<boost::fusion::cons<cssgen::map_data const&, boost::fusion::nil>, boost::fusion::vector0 >, boost::spirit::unused_type, boost::optionalstd::string >(boost::spirit::karma::detail::output_iteratorstd::back_insert_iterator<std::string, mpl_::int_<15>, boost::spirit::unused_type>&, boost::spirit::context<boost::fusion::cons<cssgen::map_data const&, boost::fusion::nil>, boost::fusion::vector0 >&, boost::spirit::unused_type const&, boost::optionalstd::string const&) const (this=0x8ba358, sink=..., ctx=..., d=..., attr=...)
The text was updated successfully, but these errors were encountered: