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 click on path to focus on map #799

Closed
Echolon opened this issue Jan 1, 2022 · 13 comments
Closed

Crash when click on path to focus on map #799

Echolon opened this issue Jan 1, 2022 · 13 comments
Labels
beginner job 🔰 This is a relatively easy task suitable for new contributors. bug 🐞 A functional defect or unexpected behavior. duplicate ➿ This ticket already exists. priority 🚨️ This issue will be most probably addressed before the next release.

Comments

@Echolon
Copy link

Echolon commented Jan 1, 2022

Describe the bug
Clicking on a pathway like a train path to focus is a feature I found accidentally - cool :-)
However its crashing for walking / food paths.

Screenshot_20220101-134839

To Reproduce
Steps to reproduce the behavior:

  1. Search a connection that includes walking / food paths
  2. Click on the food path to focus (see screenshot)
  3. The app crashes

Expected behavior
Focus the map view to this path

Versions (please complete the following information):

  • Transportr Version: 2.1.4
  • Device: HTC One M7
  • Android Version: 7.1.2

Provider selected: Deutsche Bahn

@Echolon Echolon added the bug 🐞 A functional defect or unexpected behavior. label Jan 1, 2022
@mimi89999
Copy link
Contributor

Can't reproduce. What provider are you using? Do you have a logcat?

@Echolon
Copy link
Author

Echolon commented Apr 5, 2022

@mimi89999 Provider? You mean my mobile provider?

Is there a tutorial for logcat?

@Echolon
Copy link
Author

Echolon commented Apr 5, 2022

I can still reproduce this way

@mimi89999
Copy link
Contributor

Provider?

I mean the network you chose on the start screen

@Echolon
Copy link
Author

Echolon commented Apr 5, 2022

ah, German Deutsche Bahn

@mimi89999
Copy link
Contributor

What did you enter into departure and arrival fields?

@Echolon
Copy link
Author

Echolon commented Apr 5, 2022

What did you enter into departure and arrival fields?

Any search which contains footpath results this issue

@mimi89999
Copy link
Contributor

04-06 12:36:46.967 20696 20696 E AndroidRuntime: FATAL EXCEPTION: main
04-06 12:36:46.967 20696 20696 E AndroidRuntime: Process: de.grobox.liberario, PID: 20696
04-06 12:36:46.967 20696 20696 E AndroidRuntime: com.mapbox.mapboxsdk.exceptions.InvalidLatLngBoundsException: Cannot create a LatLngBounds from 1 items
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at com.mapbox.mapboxsdk.geometry.LatLngBounds$Builder.build(LatLngBounds.java:440)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at de.grobox.transportr.trips.detail.TripDetailViewModel.onLegClick(TripDetailViewModel.kt:84)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at de.grobox.transportr.trips.detail.LegViewHolder.bind$lambda-8(LegViewHolder.kt:105)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at de.grobox.transportr.trips.detail.LegViewHolder.lambda$ZO4xQ3iy5sO6sUlnAWNNXdwE_eY(Unknown Source:0)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at de.grobox.transportr.trips.detail.-$$Lambda$LegViewHolder$ZO4xQ3iy5sO6sUlnAWNNXdwE_eY.onClick(Unknown Source:4)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.view.View.performClick(View.java:7448)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.view.View.performClickInternal(View.java:7425)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.view.View.access$3600(View.java:810)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.view.View$PerformClick.run(View.java:28305)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7664)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
04-06 12:36:46.967 20696 20696 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

@Echolon
Copy link
Author

Echolon commented Apr 6, 2022

Many thanks, so you were able to reproduce?

@mimi89999
Copy link
Contributor

It's an issue with that network in public-transport-enabler. The problem is that for some walking trip legs, the reported departure and arrival coordinates are exactly the same.

@ialokim
Copy link
Collaborator

ialokim commented Apr 26, 2022

Interesting, thanks for investigating @mimi89999! Even if its an issue with the data, we should avoid the crash. Checking for the distance before calling the map library function would be a quick fix.

@ialokim ialokim added beginner job 🔰 This is a relatively easy task suitable for new contributors. priority 🚨️ This issue will be most probably addressed before the next release. labels Apr 26, 2022
@Altonss
Copy link
Collaborator

Altonss commented May 22, 2023

It's an issue with that network in public-transport-enabler. The problem is that for some walking trip legs, the reported departure and arrival coordinates are exactly the same.

I haven't been able to trigger this situation, what departure/arrival did you choose?

@Altonss
Copy link
Collaborator

Altonss commented May 22, 2023

This seems to be a duplicate of #574

@ialokim ialokim closed this as completed May 23, 2023
@Altonss Altonss added the duplicate ➿ This ticket already exists. label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner job 🔰 This is a relatively easy task suitable for new contributors. bug 🐞 A functional defect or unexpected behavior. duplicate ➿ This ticket already exists. priority 🚨️ This issue will be most probably addressed before the next release.
Projects
None yet
Development

No branches or pull requests

4 participants