You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting an empty list of vehicles pyvroom the python process crashes with a Segmentation Fault.
Setting an empty list of vehicles for the problem instance is obviously not what anyone would intend to do and is something that one might want to detect early in its logic, but it may be inviable to anticipate what other scenarios end up triggering a segfault.
Nevertheless, a segmentation fault in the python process itself is something that code making use of pyvroom can not defent itself against or recover from, is fairly unexpected and is something that makes detecting and debugging the actual issue much harder.
It would be a great improvement even just throwing a generic RuntimeError.
Here is a minimal code reproducing the segfault with pyvroom version 1.14.0 on Ubuntu (kernel 6.5.0) aarch64:
@jcoupey, I assume that throwing an exception if there are no vehicles is best added upstream vroom. If not, I can easily add on in the Python layer alone.
Looks like you're assigning an empty array as a vehicle, which is different than having an empty list of vehicles. Anyway it turns out that both situations are handled upstream when using json input:
Hello,
When setting an empty list of vehicles pyvroom the python process crashes with a Segmentation Fault.
Setting an empty list of vehicles for the problem instance is obviously not what anyone would intend to do and is something that one might want to detect early in its logic, but it may be inviable to anticipate what other scenarios end up triggering a segfault.
Nevertheless, a segmentation fault in the python process itself is something that code making use of pyvroom can not defent itself against or recover from, is fairly unexpected and is something that makes detecting and debugging the actual issue much harder.
It would be a great improvement even just throwing a generic RuntimeError.
Here is a minimal code reproducing the segfault with pyvroom version 1.14.0 on Ubuntu (kernel 6.5.0) aarch64:
Thank you very much for your work
The text was updated successfully, but these errors were encountered: