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

Fix call to way:id() in PostGIS profile example #6745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tumik
Copy link

@tumik tumik commented Nov 30, 2023

Issue: #6204

Tasklist

Requirements / Relations

No requirements or relations.

@mjjbell
Copy link
Member

mjjbell commented Mar 17, 2024

In the issue details you mention that it segfaults on calling way:id().
Can you clarify that you intend this to be a fix?

@tumik
Copy link
Author

tumik commented Mar 17, 2024

I did not experience segfaults with this fix unlike the issue creator. This fix works for me.

I suspect the segfault mentioned in the issue was unrelated but might be worth it for someone else to try it out too.

@mjjbell
Copy link
Member

mjjbell commented Mar 17, 2024

I see. I think the PostGIS example is ancient however, and requires upgrading.

For example, when I run it, fails on an earlier line

 traceback:
	profiles/examples/postgis.lua:43: in function 'way_function'
profiles/examples/postgis.lua:43: attempt to index a nil value (field 'tags')

local highway = way.tags:Find("highway")

Probably because the SOL bindings have changed in the last 8 years.

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

Successfully merging this pull request may close these issues.

None yet

2 participants