CesiumGS / cesium-omniverse

Bringing the 3D geospatial ecosystem to Omniverse
https://cesium.com/platform/cesium-for-omniverse/
Apache License 2.0
55 stars 7 forks source link

RuntimeError: Failed to acquire interface #94

Closed lilleyse closed 1 year ago

lilleyse commented 1 year ago

If you try running usdrt-test on Linux you'll see the error:

2022-12-16 19:35:33 [49,101ms] [Error] [carb.scripting-python.plugin] RuntimeError: Failed to acquire interface: cesium::omniverse::ICesiumOmniverseInterface (pluginName: nullptr)

At:
  /home/slilley/Code/cesium-omniverse/exts/cesium.omniverse/cesium/omniverse/extension.py(51): on_startup
  /home/slilley/.local/share/ov/pkg/deps/82b461274b877b7d5e1a405066cfd47a/kernel/py/omni/ext/_impl/_internal.py(148): _startup_ext
  /home/slilley/.local/share/ov/pkg/deps/82b461274b877b7d5e1a405066cfd47a/kernel/py/carb/profiler/__init__.py(81): wrapper
  /home/slilley/.local/share/ov/pkg/deps/82b461274b877b7d5e1a405066cfd47a/kernel/py/omni/ext/_impl/_internal.py(197): startup
  /home/slilley/.local/share/ov/pkg/deps/82b461274b877b7d5e1a405066cfd47a/kernel/py/omni/ext/_impl/_internal.py(280): startup_extension
  PythonExtension.cpp::startup()(2): <module>

2022-12-16 19:35:33 [49,101ms] [Error] [omni.ext.plugin] [ext: cesium.omniverse-0.0.0] Failed to startup python extension.

This can be reproduced on main as well by just linking usdrt in src/core/CMakeLists.txt

Some observations so far:

lilleyse commented 1 year ago
  • The libusdrt.scenegraph.plugin.so file that ships with kit is significantly smaller than the libusdrt.scenegraph.plugin.so that ships with packman. This is not true for Windows.

I tried linking to the version that ships with kit but it didn't work.

For future reference here's the CMake change:

# cmake-format: off
add_prebuilt_project(
    RELEASE_INCLUDE_DIR
        "${KIT_SDK_ROOT}/extscore/usdrt.scenegraph/include"
    DEBUG_INCLUDE_DIR
        "${KIT_SDK_ROOT}/extscore/usdrt.scenegraph/include"
    RELEASE_LIBRARY_DIR
        "${KIT_SDK_ROOT}/extscore/usdrt.scenegraph/plugins"
    DEBUG_LIBRARY_DIR
        "${KIT_SDK_ROOT}/extscore/usdrt.scenegraph/plugins"
    RELEASE_LIBRARIES
        usdrt.scenegraph.plugin
    DEBUG_LIBRARIES
        usdrt.scenegraph.plugin
    TARGET_NAMES
        usdrt
)
# cmake-format: on
lilleyse commented 1 year ago

Same problem in Kit 104.2

lilleyse commented 1 year ago

This was fixed in https://github.com/CesiumGS/cesium-omniverse/pull/169. I was able to link to carb.flatcache.plugin directly since we no longer have any dependency on usdrt.

Texture loading is still broken on Linux, but that will be a separate issue.