Open DADA246c opened 6 months ago
in _GetAvailablePrimaryResolvers() https://github.com/PixarAnimationStudios/OpenUSD/blob/2864f3d04f396432f22ec5d6928fc37d34bb4c90/pxr/usd/ar/resolver.cpp#L313
If PXR_AR_DISABLE_PLUGIN_RESOLVER is set, allAvailableResolvers uses emptyResolverList and availablePrimaryResolvers will be empty vector.
in TF_VERIFY(availablePrimaryResolvers.back().type == defaultResolverType); https://github.com/PixarAnimationStudios/OpenUSD/blob/2864f3d04f396432f22ec5d6928fc37d34bb4c90/pxr/usd/ar/resolver.cpp#L347C5-L347C77
std::vector::back raises undefined behavior when the vector is empty (https://en.cppreference.com/w/cpp/container/vector/back)
in MSVC on Windows https://github.com/microsoft/STL/blob/8dc4faadafb52e3e0a627e046b41258032d9bc6a/stl/inc/vector#L1945 std::vector::back call _STL_VERIFY , the program will be aborted.
Windows 11
Compiler Visual Studio 2022 17.9.6
OpenUSD 24.05
--no-tutorials --no-examples --build-monolithic --build-variant debug
Filed as internal issue #USD-9654
Description of Issue
in _GetAvailablePrimaryResolvers() https://github.com/PixarAnimationStudios/OpenUSD/blob/2864f3d04f396432f22ec5d6928fc37d34bb4c90/pxr/usd/ar/resolver.cpp#L313
If PXR_AR_DISABLE_PLUGIN_RESOLVER is set, allAvailableResolvers uses emptyResolverList and availablePrimaryResolvers will be empty vector.
in TF_VERIFY(availablePrimaryResolvers.back().type == defaultResolverType); https://github.com/PixarAnimationStudios/OpenUSD/blob/2864f3d04f396432f22ec5d6928fc37d34bb4c90/pxr/usd/ar/resolver.cpp#L347C5-L347C77
std::vector::back raises undefined behavior when the vector is empty (https://en.cppreference.com/w/cpp/container/vector/back)
in MSVC on Windows https://github.com/microsoft/STL/blob/8dc4faadafb52e3e0a627e046b41258032d9bc6a/stl/inc/vector#L1945 std::vector::back call _STL_VERIFY , the program will be aborted.
Steps to Reproduce
System Information (OS, Hardware)
Windows 11
Compiler Visual Studio 2022 17.9.6
Package Versions
OpenUSD 24.05
Build Flags
--no-tutorials --no-examples --build-monolithic --build-variant debug