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
Plugins don't work if Python is not initialized #1466
Comments
Explanation:
If Python is not initialized, the function In addition if the registry function is not called, |
Filed as internal issue #USD-6589 |
This may be difficult to trigger, it appears the bug depends on side-effects of compilation, including which vfx reference platform is being used. This may have to do with initialization order causing python to be initialized anyway, or other calls to SubscribeTo. However searching the code, it does appear that registration functions of newly loaded plugins are only called as a side-effect of calling SubscribeTo. I suspect you intended to call already-subscribed ones immediately after the dlopen in the plugin loader. |
Description of Issue
The
TF_REGISTRY_FUNCTION
is not called ifPy_Initialize()
has not been done.In a related side-effect bug, Hf_PluginEntry::IncRefCount() crashes if there is any problem with the plugin.
Steps to Reproduce
Make a very simple renderDelegate plugin (ie one that does not call Python, there may be other fixes. The prman plugin does not trigger this bug). Make a simple "renderer" that just calls
pxr::HdRendererPluginRegistry::GetInstance().GetRendererPlugin(rendererId)
.Inserting
Py_Initialize()
before this makes the program work.System Information (OS, Hardware)
Linux
Package Versions
20.11
The text was updated successfully, but these errors were encountered: