Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Vector iterators incompatible" in Sdf copyUtils #1146

Closed
seando-adsk opened this issue Mar 17, 2020 · 2 comments
Closed

"Vector iterators incompatible" in Sdf copyUtils #1146

seando-adsk opened this issue Mar 17, 2020 · 2 comments

Comments

@seando-adsk
Copy link
Contributor

Description of Issue

This line of code contains an operator== comparing two iterators that can come from different containers.

According to the standard comparing iterators from different contains is undefined. Once such example is here.

In the code finalIt could be from either the src or dst. When it's from the dst, this will trigger the following exception on Windows if you compile with STL iterator debugging:
_STL_VERIFY(this->_Getcont() == _Right._Getcont(), "vector iterators incompatible");

It should be a simple enough fix, but I wanted to log an issue to get your opinion on it and to see if there are other places that would need to be fixed.

Steps to Reproduce

  1. Compile on Windows with iterator debugging enabled.
  2. Invoke the SdfCopySpec function.

System Information (OS, Hardware)

Windows 10

Build Flags

_ITERATOR_DEBUG_LEVEL > 0

@jilliene
Copy link

Filed as internal issue #USD-5940

@sunyab
Copy link
Contributor

sunyab commented Jun 1, 2020

@seando-adsk Thanks for filing this! We have a fix that should be pushed out to the dev branch soon.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants