Skip to content

Commit 5905a07

Browse files
authored
Fix navigation status update (#733)
Only check "on surface" if the cache is not exhausted (in this case navgiation.next() is not valid). This should fix a bug in traccc where the navigator does not find any candidates in a fresh init, but does not abort because the status update reads random data
1 parent bf7453e commit 5905a07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/include/detray/navigation/navigator.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ class navigator {
696696

697697
// Check whether the track reached the current candidate. Might be a
698698
// portal, in which case the navigation needs to be re-initialized
699-
if (navigation.is_on_object(*navigation.next(), cfg)) {
699+
if (!navigation.is_exhausted() &&
700+
navigation.is_on_object(*navigation.next(), cfg)) {
700701
// Set the next object that we want to reach (this function is only
701702
// called once the cache has been updated to a full trust state).
702703
// Might lead to exhausted cache.

0 commit comments

Comments
 (0)