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

pxr::Tftoken global destructor can cause a freeze in C++. #21

Closed
MasayaNikaido opened this issue May 13, 2024 · 2 comments
Closed

pxr::Tftoken global destructor can cause a freeze in C++. #21

MasayaNikaido opened this issue May 13, 2024 · 2 comments

Comments

@MasayaNikaido
Copy link

Static TfToken is unsafe.
These codes have direct static TfToken definitions.

I think it would be better to use the Static Token macros or pxr::Tftoken::Immortal.

Platform and Version

  • USD 1.38.7 (monolithic build)
  • Windows11 x64
  • Visual Studio 2022

Logs taken while reproducing problem

CallStack

ntdll.dll!NtDelayExecution() + 20 bytes	Unknown
ntdll.dll!RtlDelayExecution() + 67 bytes	Unknown
KernelBase.dll!SwitchToThread() + 27 bytes	Unknown
usd_ms.dll!pxrInternal_v0_23__pxrReserved__::TfToken::_PossiblyDestroyRep() + 212 bytes	Unknown
fileformatUtils.dll!adobe::usd::Resolver::populateCache() + 2439 bytes	Unknown
fileformatUtils.dll!adobe::usd::Resolver::populateCache() + 5454 bytes	Unknown
fileformatUtils.dll!adobe::usd::Resolver::populateCache() + 1303 bytes	Unknown
fileformatUtils.dll!adobe::usd::Resolver::populateCache() + 1279 bytes	Unknown
fileformatUtils.dll!adobe::usd::Resolver::populateCache() + 1279 bytes	Unknown
fileformatUtils.dll!00007ffb3da8c5e2()	Unknown
ucrtbase.dll!__sys_nerr() + 691 bytes	Unknown
ucrtbase.dll!_o_free() + 222 bytes	Unknown
ucrtbase.dll!_execute_onexit_table() + 61 bytes	Unknown
fileformatUtils.dll!00007ffb3da809fd()	Unknown
fileformatUtils.dll!00007ffb3da80b22()	Unknown
ntdll.dll!RtlActivateActivationContextUnsafeFast() + 303 bytes	Unknown
ntdll.dll!LdrShutdownProcess() + 374 bytes	Unknown
ntdll.dll!RtlExitUserProcess() + 173 bytes	Unknown
kernel32.dll!ExitProcess() + 11 bytes	Unknown
@kwblackstone
Copy link
Contributor

Thanks for bringing this to our attention, we will do an audit of all non-trivial globals.

@kwblackstone
Copy link
Contributor

These specific cases are fixed in v1.0.4 with some more fixes on the way. Please reopen if you are still having issues.

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

No branches or pull requests

2 participants