Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

MAYA-127137: fix crash due to incompatible dictionary iterator #2197

Conversation

perrauo-adsk
Copy link

Summary:
The type map passed as a parameter, and the one cached as a variable are different resulting in a crash.

From the following callstack

>	usd_usdImaging.dll!pxrInternal_v0_22__pxrReserved__::UsdImagingAdapterRegistry::_ConstructAdapter<pxrInternal_v0_22__pxrReserved__::UsdImagingAPISchemaAdapter,pxrInternal_v0_22__pxrReserved__::UsdImagingAPISchemaAdapterFactoryBase>(const pxrInternal_v0_22__pxrReserved__::TfToken & adapterKey, const std::unordered_map<pxrInternal_v0_22__pxrReserved__::TfToken,pxrInternal_v0_22__pxrReserved__::TfType,pxrInternal_v0_22__pxrReserved__::TfToken::HashFunctor,std::equal_to<pxrInternal_v0_22__pxrReserved__::TfToken>,std::allocator<std::pair<pxrInternal_v0_22__pxrReserved__::TfToken const ,pxrInternal_v0_22__pxrReserved__::TfType>>> & tm) Line 330	C++
 	usd_usdImaging.dll!pxrInternal_v0_22__pxrReserved__::UsdImagingAdapterRegistry::ConstructAPISchemaAdapter(const pxrInternal_v0_22__pxrReserved__::TfToken & adapterKey) Line 397	C++
 	usd_usdImaging.dll!pxrInternal_v0_22__pxrReserved__::UsdImagingStageSceneIndex::_APIAdapterLookup(const pxrInternal_v0_22__pxrReserved__::TfToken & adapterKey) Line 374	C++
 	usd_usdImaging.dll!pxrInternal_v0_22__pxrReserved__::UsdImagingStageSceneIndex::_AdapterSetLookup(pxrInternal_v0_22__pxrReserved__::UsdPrim prim) Line 337	C++
 	usd_usdImaging.dll!pxrInternal_v0_22__pxrReserved__::UsdImagingStageSceneIndex::_Populate(pxrInternal_v0_22__pxrReserved__::UsdPrim subtreeRoot) Line 548	C++
 	usd_usdImaging.dll!pxrInternal_v0_22__pxrReserved__::UsdImagingStageSceneIndex::Populate() Line 525	C++

Changes:
Ensure that the one end() iterator is retrieved from the type map passed as a parameter.

@sunyab
Copy link
Contributor

sunyab commented Jan 27, 2023

Filed as internal issue #USD-7916

@spiffmon
Copy link
Member

Hi @perrauo-adsk , we would like to merge this PR, but you are not listed in our corporate CLA with Autodesk. Can you please ask Ian Pendlebury to authorize your addition by emailing usd-cla at pixar.com ?

Thanks!

@perrauo-adsk
Copy link
Author

perrauo-adsk commented Jan 31, 2023

@spiffmon We are currently determining what is the correct approach toward contributing and cannot sign the CLA at the moment. Since this is a one-liner and you want to get this in, please feel free to make the change on your end, and close this PR.

I apologize for the confusion.

@AdamFelt
Copy link
Contributor

@spiffmon We can delete this PR and I can submit it as another PR under my name since I have already signed the CLA. Does that work, or have you already made progress towards fixing this yourselves?

@cvj
Copy link
Contributor

cvj commented Jan 31, 2023

@AdamFelt I've already gone ahead and made the change on our (Pixar's) end, so I don't think we need to create another PR for this.

@perrauo-adsk perrauo-adsk deleted the adsk/bugfix/incompatible-dictionary-iterator-2 branch January 31, 2023 21:44
pixar-oss pushed a commit that referenced this pull request Feb 7, 2023
unordered_map.

Fixes #2197

(Internal change: 2261675)
seando-adsk pushed a commit to autodesk-forks/USD that referenced this pull request Mar 1, 2024
unordered_map.

Fixes PixarAnimationStudios#2197

(Internal change: 2261675)

(cherry picked from commit 2bc30d4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants