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

Crash when adding a parking lane #4634

Closed
Mbodin opened this issue Nov 15, 2022 · 1 comment · Fixed by #4657
Closed

Crash when adding a parking lane #4634

Mbodin opened this issue Nov 15, 2022 · 1 comment · Fixed by #4657
Assignees
Labels

Comments

@Mbodin
Copy link

Mbodin commented Nov 15, 2022

The crash only happens with a specific way, but is deterministic.

How to Reproduce

  • Select this way in the parking lane overlay: https://www.openstreetmap.org/way/4014978
  • Then select the south side and add “parallel on street side” (screenshot below). Leave the north side as-is.
  • The app crashes when confirming.

Expected Behavior
I would expect the app to add the information I gave to the map.

Alternatively, if the way was not meant to be added a parking lane, then I would not expect the app to let me select it in the first place.

Additional information
Screenshot:
Screenshot_2022-11-15-10-45-48-614_de westnordost streetcomplete

Here is the backtrace that I get:

java.lang.IllegalArgumentException: Attempting to tag invalid parking lane
	at de.westnordost.streetcomplete.osm.street_parking.StreetParkingKt.toOsmLaneValue(StreetParking.kt:122)
	at de.westnordost.streetcomplete.osm.street_parking.StreetParkingKt.applyTo(StreetParking.kt:92)
	at de.westnordost.streetcomplete.overlays.street_parking.StreetParkingOverlayForm.onClickOk(StreetParkingOverlayForm.kt:136)
	at de.westnordost.streetcomplete.overlays.AbstractOverlayForm.onViewCreated$lambda-6(AbstractOverlayForm.kt:194)
	at de.westnordost.streetcomplete.overlays.AbstractOverlayForm.$r8$lambda$18Xv-GzCmBt76jzZFt341LP4EVc(AbstractOverlayForm.kt)
	at de.westnordost.streetcomplete.overlays.AbstractOverlayForm$$ExternalSyntheticLambda2.onClick(R8$$SyntheticClass)
	at android.view.View.performClick(View.java:5647)
	at android.view.View$PerformClick.run(View.java:22465)
	at android.os.Handler.handleCallback(Handler.java:754)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:163)
	at android.app.ActivityThread.main(ActivityThread.java:6238)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

Here are the keys of the way in question:

highway=service
maxspeed=30
name=Rue Eugène Chavant
parking:lane:both=parallel
surface=asphalt

The reason why I leave the north side as-is is that there is a discrepancy between what is meant to be and what there is: according to what the signs says, it should be parking:lane:left=no, but in practice people will informally park there where they can, so it’s more like parking:lane:left=parallel, parking:lane:left:parallel=half_on_kerb, leaving no actual space for pedestrians.
If the goal of this key is to measure the space dedicated to cars, I guess that the second would be more useful (as this part of the street is filled with cars), but if the goal is to tell drivers where to safely park, the first version is preferable. If we add to this the fact that the town actually uses OSM maps, then drivers could start complaining against fines because the town maps says so.
So really, there is no solution that I’m comfortable with about the north side of the street. The south is clear though, hence my answer ☺

Versions affected
Android version: 7.1.2 N2G47H
Kernel version: 3.18.31-perf-g6507e5c
StreetComplete version: v49.0

@Mbodin Mbodin added the bug label Nov 15, 2022
@westnordost
Copy link
Member

Ah yes, this is actually not trivial to fix. Because parking lanes, sidewalks, cycleways and so on can be conflated to *:both=* and at the same time the app allows you to change just one side, not both, this leads to some issues. I am working on it

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

Successfully merging a pull request may close this issue.

2 participants