-
Notifications
You must be signed in to change notification settings - Fork 201
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
Updated LayerManager to purge cached self on scene reset #1760
Updated LayerManager to purge cached self on scene reset #1760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one request for a change in comments. Additionally, I'm curious about this multi-threaded-related crash that you were getting. Do you happen to have any more info? Call-stack maybe?
lib/mayaUsd/nodes/layerManager.cpp
Outdated
if (layerManagerHandle.isValid() && layerManagerHandle.isAlive()) { | ||
MObject mobj { layerManagerHandle.object() }; | ||
if (!mobj.isNull()) { | ||
fn.setObject(mobj); | ||
return static_cast<MayaUsd::LayerManager*>(fn.userNode()); | ||
} else { | ||
MGlobal::displayInfo("LayerManager::findNode cache got null MObject"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These traces doesn't tell much to the end-user, please remove them.
Here's the stack we got with that issue:
|
92f5c27
to
70cbf10
Compare
This change to the AL plugin's
LayerManager
was authored to solve a multi-threaded-related crash when using a somehow "valid" and "alive"MObjectHandle
for theLayerManager
cache. The change ensures that the cache is cleared on each new scene, resolving the issue.I have also gone ahead and made similar changes to the shared
LayerManager
as requested in PR #1734. Let me know if there are any changes you think would be appropriate for the shared implementation - I've tried to base it on what was already there.