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

Empty custom matrix #570

Closed
jcoupey opened this issue Sep 8, 2021 · 2 comments
Closed

Empty custom matrix #570

jcoupey opened this issue Sep 8, 2021 · 2 comments

Comments

@jcoupey
Copy link
Collaborator

jcoupey commented Sep 8, 2021

We have a check in place for (custom) matrix size consistency. For example using "matrices": {"car": {"durations": [[0]]}} result in an adequate error if some location_index values are not zero. But the problem is that we somehow assume that a custom matrix is not empty. If it is, then based on its size in this check we behave as if no matrix was provided in input and try grabbing a non-existing routing wrapper.

With "matrices": {"car": {"durations": []}}:

$ vroom [...]
vroom: structures/vroom/input/input.cpp:576: vroom::Input::set_matrices(unsigned int)::<lambda(const std::vector<std::__cxx11::basic_string<char> >&)>: Assertion `rw != _routing_wrappers.end()' failed.
Aborted (core dumped)

This is really an edge case as there is no point in defining an empty custom matrix in input (probably why no-one reported this yet), but still we should handle this properly.

@jcoupey jcoupey added this to the v1.11.0 milestone Sep 8, 2021
@jcoupey
Copy link
Collaborator Author

jcoupey commented Sep 8, 2021

I'll fix this in #555 since I'm working on the whole matrix stuff there.

@jcoupey jcoupey mentioned this issue Sep 8, 2021
8 tasks
@jcoupey
Copy link
Collaborator Author

jcoupey commented Sep 30, 2021

Fixed in #555

@jcoupey jcoupey closed this as completed Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant