Opened 13 years ago
Closed 13 years ago
#593 closed defect/bug (fixed)
Please add null check for vehicleprofile
Reported by: | tegzed | Owned by: | KaZeR |
---|---|---|---|
Priority: | minor | Milestone: | version 0.2.0 |
Component: | core | Version: | git master |
Severity: | Keywords: | ||
Cc: |
Description
Please add null check for tr->vehicleprofile in function tracking_angle_delta in track.c , since it causes segfault when vehicle profile name is set incorrectly in navit.xml for a vehicle.
Thanks David Tegze
Change History (3)
comment:1 Changed 13 years ago by kazer
- Milestone set to version 0.2.0
comment:2 Changed 13 years ago by tegzed
OK, so my problem was that I renamed my original vehicle profile to car_HIGHWAY and also created one profile named to car_NO_HIGHWAY with road weight of highways set to a low value to be able to avoid highways and the segfault was caused because I had no profile named car when I mistyped the profilename attribute's value in the vehicle tag of navit.xml. I think it's worth null checking profile and maybe warn the user if such problem arise.
Thanks, David
comment:3 Changed 13 years ago by akashihi
- Resolution set to fixed
- Status changed from new to closed
Fixed in r3434
I've also added a new behaviour for incorrect profile settings: first navit tries to use a 'car' profile, but in case of failure it will try to use some random profile from navit.xml
When the profilename is set incorrectly, navit will use the 'car' profile by default. Indeed, if it's not set, it can cause an issue. Are you talking of the vehicle profile name, or the vehicle source?