diff --git a/src/pipeline/resolver.h b/src/pipeline/resolver.h index b5a6b58721..9a3e753935 100644 --- a/src/pipeline/resolver.h +++ b/src/pipeline/resolver.h @@ -136,9 +136,17 @@ namespace librealsense void open() { - for (auto && kvp : _dev_to_profiles) { - auto&& sub = _results.at(kvp.first); - sub->open(kvp.second); + // Camera has a limitation such that opening the color sensor after the + // depth sensor may cause the depth sensor a reset. + // This artifact may cause unexpected behavior when we ask to stop the sensor in parallel or control it + // while it is doing a reset. + // As a workaround for pipeline API usage, we use the assumption that depth sensor is first in the map if it is added to the configuration, + // When we reverse iterate it, the depth sensor opening will be last This should not affect other stream + // which are capable of being opened decoupled from other sensors + for( auto it = _dev_to_profiles.rbegin(); it != _dev_to_profiles.rend(); it++ ) + { + auto && sub = _results.at( it->first ); + sub->open( it->second ); } } diff --git a/unit-tests/live/frames/test-pipeline-start-stop.py b/unit-tests/live/frames/test-pipeline-start-stop.py index 897766149f..0dc06fa4e7 100644 --- a/unit-tests/live/frames/test-pipeline-start-stop.py +++ b/unit-tests/live/frames/test-pipeline-start-stop.py @@ -1,6 +1,7 @@ # License: Apache 2.0. See LICENSE file in root directory. -# Copyright(c) 2023 Intel Corporation. All Rights Reserved. +# Copyright(c) 2023-2024 Intel Corporation. All Rights Reserved. +# test:donotrun:!nightly # Currently, we exclude D457 as it's failing # test:device each(D400*) !D457 @@ -10,7 +11,7 @@ import time # Run multiple start stop of all streams and verify we get a frame for each once -ITERATIONS_COUNT = 2 +ITERATIONS_COUNT = 50 dev = test.find_first_device_or_exit()