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

Infinite loop in sortAndFilterTrips #426

Closed
evansiroky opened this issue Feb 23, 2019 · 1 comment · Fixed by #427
Closed

Infinite loop in sortAndFilterTrips #426

evansiroky opened this issue Feb 23, 2019 · 1 comment · Fixed by #427

Comments

@evansiroky
Copy link
Contributor

evansiroky commented Feb 23, 2019

Observed behavior (please include a screenshot if possible)

The sortAndFilterTrips in lib/editor/util/index.js will run in an infinite loop if one of the trips have an empty array of stop times.

Expected behavior

Infinite loop should be avoided.

Steps to reproduce the problem

While editing this GTFS file (gtfs_GL.zip) in the datatools-ui editor, I changed the service_id on the calendar entry. Then, I checked some stop times in the timetable and noticed that they are completely missing for the even numbered trips. In certain cases the only trips available for a certain service id were those that didn't have any stop_times. In those cases, the UI froze because an infinite loop was encountered while trying to sort the trips.

Any special notes on configuration used

Editor module must be enabled.

Version of datatools-ui and datatools-server if applicable (exact commit hash or branch name)

gtfs-lib: conveyal/gtfs-lib@5ec5285
datatools-server: ibi-group/datatools-server@5943dfb
datatools-ui: 0f10fa2

@landonreed
Copy link
Contributor

🎉 This issue has been resolved in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants