GithubHelp home page GithubHelp logo

Comments (10)

joto avatar joto commented on July 23, 2024

@fbielig can you verify the bug is gone?

from libosmium.

 avatar commented on July 23, 2024

This bug is really gone. Thank you a lot for fast reactions.

Unfortunately my program stops with another segmentation fault. Stack trace you can see below. in generell I do not more than using your multipolygon assembler with tens of thousends of features. Probably you can reproduce my issue by dumping all multipolygons of a larger area. For small data sets everythings works pretty well.

---8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<---
0 osmium::memory::Item::byte_size item.hpp 150 0x5a5cf2
1 osmium::memory::Collection<osmium::Tag, (osmium::item_type)17>::cend collection.hpp 136 0x5bb1a4
2 osmium::memory::Collection<osmium::Tag, (osmium::item_type)17>::end collection.hpp 144 0x5bb148
3 osmium::area::Assembler::operator() assembler.hpp 746 0x6016fa
4 osmium::area::MultipolygonCollectorosmium::area::Assembler::complete_relation multipolygon_collector.hpp 166 0x61f8be
5 osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2::find_and_add_object collector.hpp 175 0x61dc06
6 osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2::way collector.hpp 201 0x61bf43
7 osmium::detail::apply_item_recurseosmium::relations::Collector<osmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2, osmium::memory::Item> visitor.hpp 72 0x6197b5
8 osmium::detail::apply_item_recurse<m1::osm::osmium::clipping::ClipCropped::Pass2, osmium::memory::Item, osmium::relations::Collector<osmium::area::MultipolygonCollectorosmium::area::Assembler, false, true, false>::HandlerPass2> visitor.hpp 209 0x614f15
9 osmium::apply<osmium::io::InputIterator<osmium::io::Reader, osmium::memory::Item>, m1::osm::osmium::clipping::ClipCropped::Pass2, osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2> visitor.hpp 238 0x60e8d4
10 osmium::apply<osmium::io::Reader, m1::osm::osmium::clipping::ClipCropped::Pass2, osmium::relations::Collector<osmium::area::MultipolygonCollectorosmium::area::Assembler, false, true, false>::HandlerPass2> visitor.hpp 245 0x608714
11 m1::osm::osmium::clipping::ClipCropped::clip clip_cropped.cpp 962 0x5f55fc
12 main m1osm_clipper.cpp 312 0x58bb4b

from libosmium.

joto avatar joto commented on July 23, 2024

For me it runs fine with, for instance, Germany. Don't know whether that counts as a "larger dataset" for you. :-)

It is a bit difficult to debug without access to the code and an example file. Can you reproduce this with one of the example programs and tell me which data file you are using?

Are you sure you are not simply running out of memory?

from libosmium.

 avatar commented on July 23, 2024

Currently I'm working on a planet extract of South America. Unfortunately my issue is not reproducable with your examples. I'm still trying to nail this bug down. Even GDB crashes while debugging. Memory outage is not the problem.

from libosmium.

alex85k avatar alex85k commented on July 23, 2024

It is certainly the the same bug that broke the testing in #42 (comment) : iterator in find_and_add_object becomes undefined after "erase" call in complete_relation method. Sometimes it works fine, sometimes give an assertion (with strictly-iterator-checking Debug MS STL), sometimes crashes :)

@fbielig : you can try small example https://raw.githubusercontent.com/osmcode/osm-testdata/master/grid/data/all.osm . Maybe it will crash too (it does on Windows at #42 )

from libosmium.

 avatar commented on July 23, 2024

Now I have a data file generating a failing assertion. This time I used test program libosmium_area_test. My test file still has nearly 40MB. I try to get it smaller and send it to @joto directly. Is it ok?

3 __GI___assert_fail 101 0x7ffff6bc2b22
4 osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2::find_and_add_object collector.hpp 166 0x545f64
5 osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2::way collector.hpp 201 0x542fad
6 osmium::detail::apply_item_recurseosmium::relations::Collector<osmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2, osmium::memory::Item> visitor.hpp 72 0x53e5ae
7 osmium::detail::apply_item_recurse<osmium::handler::NodeLocationsForWays<osmium::index::map::SparseTable<unsigned long, osmium::Location>, osmium::index::map::Dummy<unsigned long, osmium::Location>>, osmium::memory::Item, osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2> visitor.hpp 209 0x538145
8 osmium::apply<osmium::io::InputIterator<osmium::io::Reader, osmium::memory::Item>, osmium::handler::NodeLocationsForWays<osmium::index::map::SparseTable<unsigned long, osmium::Location>, osmium::index::map::Dummy<unsigned long, osmium::Location>>, osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2> visitor.hpp 238 0x52fb12
9 osmium::apply<osmium::io::Reader, osmium::handler::NodeLocationsForWays<osmium::index::map::SparseTable<unsigned long, osmium::Location>, osmium::index::map::Dummy<unsigned long, osmium::Location>>, osmium::relations::Collectorosmium::area::MultipolygonCollector<osmium::area::Assembler, false, true, false>::HandlerPass2> visitor.hpp 245 0x525b58
10 main osmium_area_test.cpp 120 0x50117f

@alex85k: unfortunatly your small example works on my side.

from libosmium.

alex85k avatar alex85k commented on July 23, 2024

@fbielig : I am almost sure the both fails will be fixed together when @joto will find some time to investigate (it is not very easy to fix, so I can not make a patch). The reason from previous comment is most likely (99%) correct :)

from libosmium.

joto avatar joto commented on July 23, 2024

Hopefully fixed in 9edb40d.

from libosmium.

 avatar commented on July 23, 2024

Thank you for you efforts. This issue is really fixed in my test cases.

PS: Next issue will come soon ;)

from libosmium.

 avatar commented on July 23, 2024

I will send you a new test dateset creating a segfault in libosmium_area_test. Probably it relates to the quite complex multipolygon 273387779.

from libosmium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.