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

RuntimeError: unreachable executed when the underlying Rust crate panicked #221

Closed
gisfromscratch opened this issue Aug 5, 2023 · 2 comments

Comments

@gisfromscratch
Copy link

We could reproduce some panicking of the underlying Rust crate using a specific area of interest.
The issue also arises when using the cli from a/b street.

Would you be so kind what causes the crash. Some common practices narrowing the data error down are needed. From a geospatial engineer perspective, we can easily validate and correct topology errors using our favorite geospatial tools. But, we don't know how to refer to the underlying OSM id by using the homebrewn "Road Ids" like "Road #704".

Here is the area of interest causing the crash:
Area of Interest

[2023-08-05T17:41:27Z WARN osm2streets::road] named lane doesn't exist
[2023-08-05T17:41:27Z ERROR streets_reader::split_ways] Skipping Road #704: PL with total length 50.2574m and 10 pts has dupe non-adjacent pts
[2023-08-05T17:41:27Z ERROR streets_reader::split_ways] Skipping Road #860: PL with total length 54.0387m and 10 pts has dupe non-adjacent pts
thread 'main' panicked at 'called Option::unwrap() on a None value', /home/runner/.cargo/git/checkouts/osm2streets-fbbbdf753e406749/aba1831/osm2streets/src/lanes/classic.rs:522:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
[2023-08-05T17:41:27Z ERROR abstutil::time] dropping Timer while doing progress split roads, due to panic?

dabreegster added a commit that referenced this issue Aug 5, 2023
effect in the current code (apply_width overwrites it later), and can
cause crashes like #221.
@dabreegster
Copy link
Contributor

Hi, thanks for reporting this bug! I've fixed it in the osm2streets web app. The problem is https://www.openstreetmap.org/way/148338681 has sidewalk:left:width, but there's no sidewalk=left or sidewalk=both tag. In this case, arguably sidewalk=left is implied by the presence of the other tags, but I'm not sure what tagging standards people are adopting.

osm2streets doesn't currently use tagged lane or sidewalk widths. The code I removed above was outdated and actually had no effect (a later apply_width call overwrote it). I've had #222 and #223 in mind for a long time, but haven't gotten to starting them yet. I did file issues to track.

I'll keep this issue open to track better error handling in this part of the code in general. You're right that the logged IDs aren't helpful. When lane parsing code fails, the error message should clearly state the OSM way that failed, at least

@dabreegster
Copy link
Contributor

Seems to work fine now, including the sidewalk width parsing, thanks to the switch to https://gitlab.com/LeLuxNet/Muv/

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