Skip to content
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

Segmentation fault #42

Open
simon04 opened this issue Mar 25, 2012 · 4 comments
Open

Segmentation fault #42

simon04 opened this issue Mar 25, 2012 · 4 comments

Comments

@simon04
Copy link
Contributor

simon04 commented Mar 25, 2012

Segmentation fault when executing ./osmjs -2 -m -l disk -j js/area.js ~/austria.osm.pbf.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff76c6f14 in geos::geom::LineString::getCoordinatesRO() const () from /usr/lib/libgeos-3.3.2.so
(gdb) bt
#0  0x00007ffff76c6f14 in geos::geom::LineString::getCoordinatesRO() const () from /usr/lib/libgeos-3.3.2.so
#1  0x0000000000413c39 in Osmium::OSM::AreaFromRelation::make_one_ring (this=0x8c89fe0, ways=..., first=19748545, last=19748545, ringcount=0, sequence=1) at ../include/osmium/osm/area.hpp:572
#2  0x0000000000413ee2 in Osmium::OSM::AreaFromRelation::make_one_ring (this=0x8c89fe0, ways=..., first=0, last=0, ringcount=0, sequence=0) at ../include/osmium/osm/area.hpp:609
#3  0x0000000000414bc3 in Osmium::OSM::AreaFromRelation::build_geometry (this=0x8c89fe0) at ../include/osmium/osm/area.hpp:796
#4  0x000000000041335f in Osmium::OSM::AreaFromRelation::handle_complete_multipolygon (this=0x8c89fe0) at ../include/osmium/osm/area.hpp:448
#5  0x0000000000422ffb in Osmium::Handler::Multipolygon::way (this=0x6c0580, way=...) at ../include/osmium/handler/multipolygon.hpp:151
#6  0x00000000004235d3 in DualPass2::way (this=0x7fffffffe320, way=...) at osmjs.cpp:171
#7  0x0000000000450d55 in Osmium::Input::Base<DualPass2>::call_way_on_handler (this=0x7fffead88010) at ../include/osmium/input.hpp:168
#8  0x000000000044e1ba in Osmium::Input::PBF<DualPass2>::parse_way_group<void (DualPass2::*)(boost::shared_ptr<Osmium::OSM::Way> const&)> (this=0x7fffead88010, group=..., stringtable=...) at ../include/osmium/input/pbf.hpp:240
#9  0x000000000044af55 in Osmium::Input::PBF<DualPass2>::parse_group (this=0x7fffead88010, group=..., stringtable=...) at ../include/osmium/input/pbf.hpp:153
#10 0x0000000000447e29 in Osmium::Input::PBF<DualPass2>::parse (this=0x7fffead88010) at ../include/osmium/input/pbf.hpp:86
#11 0x000000000042bce2 in Osmium::OSMFile::read<DualPass2> (this=0x7fffffffe2b0, handler=...) at ../include/osmium/osmfile_impl.hpp:35
#12 0x000000000040b2b2 in main (argc=8, argv=0x7fffffffe6c8) at osmjs.cpp:391
@simon04
Copy link
Contributor Author

simon04 commented Mar 28, 2012

Apparently, this problem does not exists in GEOS 3.2.2. Did GEOS 3.3 include some incompatible changes (also #41)?

@joto
Copy link
Owner

joto commented Apr 24, 2012

I don't know what the problem there is. For the time being I have added a few asserts() that might help find it.

@simon04
Copy link
Contributor Author

simon04 commented Apr 26, 2012

Using the changes from 3fc270d, I get the following executing with the same arguments:

1st pass finished
osmjs: ../include/osmium/osm/area.hpp:574: Osmium::OSM::RingInfo* Osmium::OSM::AreaFromRelation::make_one_ring(std::vector<Osmium::OSM::WayInfo*>&, osm_object_id_t, osm_object_id_t, int, int): Assertion `linestring' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff5adbc35 in raise () from /lib/libc.so.6

@simon04
Copy link
Contributor Author

simon04 commented Nov 25, 2012

Output of valgrind ./osmjs -2 -m -l disk -j js/area.js ~/austria.osm.pbf using 206e637 and GEOS 3.3.5 (after ≈30 minutes of execution ^^):

Non-existent physical address at address 0x369FF0010
==10876==    at 0x443A09: Osmium::Storage::ById::MmapFile<Osmium::OSM::Position>::set(unsigned long, Osmium::OSM::Position) (mmap_file.hpp:128)
==10876==    by 0x44F01E: Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >::node(boost::shared_ptr<Osmium::OSM::Node const> const&) (coordinates_for_ways.hpp:55)
==10876==    by 0x44BC36: Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2>::node(boost::shared_ptr<Osmium::OSM::Node> const&) const (handler.hpp:220)
==10876==    by 0x44F8A6: Osmium::Input::Base<Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2> >::call_node_on_handler() const (input.hpp:144)
==10876==    by 0x44C0EE: void Osmium::Input::PBF<Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2> >::parse_dense_node_group<void (Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2>::*)(boost::shared_ptr<Osmium::OSM::Node> const&) const>(OSMPBF::PrimitiveGroup const&, OSMPBF::StringTable const&, void (Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2>::*)(boost::shared_ptr<Osmium::OSM::Node> const&) const) (pbf.hpp:369)
==10876==    by 0x446480: Osmium::Input::PBF<Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2> >::parse_group(OSMPBF::PrimitiveGroup const&, OSMPBF::StringTable const&) (pbf.hpp:160)
==10876==    by 0x442303: Osmium::Input::PBF<Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2> >::parse() (pbf.hpp:94)
==10876==    by 0x42937F: void Osmium::Input::read<Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2> >(Osmium::OSMFile const&, Osmium::Handler::Sequence<Osmium::Handler::CoordinatesForWays<Osmium::Storage::ById::Base<Osmium::OSM::Position>, Osmium::Storage::ById::MmapFile<Osmium::OSM::Position> >, Osmium::Relations::Assembler<Osmium::MultiPolygon::Assembler<Osmium::Javascript::Handler, Osmium::MultiPolygon::Builder>, Osmium::Relations::RelationInfo, false, true, false, Osmium::Javascript::Handler>::HandlerPass2>&) (osmium.hpp:73)
==10876==    by 0x40AADF: main (osmjs.cpp:247)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants