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

HTTP/500 error when using recurse-down inside query #227

Closed
tyrasd opened this Issue Sep 6, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@tyrasd
Contributor

tyrasd commented Sep 6, 2015

Here's a minimal example of an (invalid) query that results in a HTTP/500 internal server error from tyrasd/overpass-turbo#198 (reported by @Abbe98):

<query type="way">
  <has-kv k="source" v="CLC06"/>
  <recurse type="down"/>
</query>
<print/>

The culprit is the recurse-down statement inside the query. Interestingly, there is no 500 when placing a recurse-up (and some other recursion types – I tried a few) inside the query: The API just returns an empty result set then (which kind of makes sense, although a syntax error would probably be best, I guess).

@mmd-osm

This comment has been minimized.

Contributor

mmd-osm commented Sep 6, 2015

In Overpass QL:

way
  ["source"="CLC06"]
  (>);
out;

BTW: same issues occurs with (>>);

This triggers a segmentation fault at:

#0  relation_node_member_ids<Relation_Skeleton> (rels=..., rman=..., role_id=0x0)
    at ../../src/test-bin/../overpass_api/statements/../data/collect_members.h:445
#1  0x0000000000549ecd in Recurse_Constraint::filter (this=0x89d780, query=..., rman=..., into=..., timestamp=18446744073709551615)
    at ../../src/test-bin/../overpass_api/statements/recurse.cc:1963
#2  0x00000000004fc9ee in Query_Statement::execute (this=0x89d820, rman=...) at ../../src/test-bin/../overpass_api/statements/query.cc:1590
#3  0x00000000004b32c1 in Osm_Script_Statement::execute (this=0x89d080, rman=...)
    at ../../src/test-bin/../overpass_api/statements/osm_script.cc:397
#4  0x0000000000406962 in main (argc=<optimized out>, argv=<optimized out>) at ../src/overpass_api/dispatch/osm3s_query.cc:193
@drolbr

This comment has been minimized.

Owner

drolbr commented May 10, 2016

Fixed in 14f0fc3 .

In fact, this is valid syntax. In the example, one can expect an empty set. But for example a use case would be to get all nodes from a bunch of relations without bothering for the ways.

@drolbr drolbr closed this Jun 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment