Can't open usd file or stage

Hi ,

I’m currently implementing the connection from my 3D application to omniverse by directly linking the nv_usd and omni_client_library libraries directly to my program’s exe, like it’s explained here:

After initializing the library…


	if (!omniClientInitialize(kOmniClientVersion))
		throw CEx("Failed to initialize OmniClient library. Possible version mismatch.");

	omniClientRegisterConnectionStatusCallback(nullptr, statusCallback);

which produces those logs:

-- INFO: Omniverse: Initializing Version 2.21.0-release.3455+tc.038c7c2e
-- INFO: Omniverse: Initializing CURL global state
-- DEBUG: Omniverse: Registering factory for 'https:'
-- DEBUG: Omniverse: Registering factory for 'http:'
-- DEBUG: Omniverse: Registering factory for 'file:'
-- INFO: Omniverse: Initializing reactor
-- DEBUG: Omniverse: Registering factory for 'omniverse:'

then loading a file that way:

	UsdStageRefPtr stage = UsdStage::Open("C:/Users/arquier/TMP/sphere.usd");
	if (!stage) 
		return false;

or even creating a new stage that way :

	UsdStageRefPtr stage = UsdStage::CreateInMemory("mystage");
	if (!stage) 
		return false;

… will always return false (the stage pointer is always invalid) and I don’t receive any warning nor debug log messages.

Is there a way I could have more information about what is happening?

Note that the ./run_omniUsdaWatcher sample seems to run very well.

Best regards

Hi @remi.arquier. I wonder if this is related: Cannot open usda file via USDStage::Open function in C++ · Issue #1011 · PixarAnimationStudios/USD · GitHub

Thanks Mati,

Unfortunately this is not the issue. I’m still investigating but I finally found out how to load properly the stage.

This can be done by not using the RizomUV embedded Python script interpreter. Weirdly, if I order the load using our LUA interpreter instead everything runs fine.

It looks like their is a conflict between our Python version and yours maybe.

  1. Have ever heard about such a conflict in other software that integrates Omniverse connection with Python?

  2. BTW, is it normal that even in debug build I get the initialization information message :
    -- INFO: Omniverse: Initializing Version 2.21.0-release.3455+tc.038c7c2e
    See the “release” tag in the string, also I can’t get debugging information when debugging when the program execute Omniverse code in that debug build type.

Best regards

We use Python 3.7 in Omniverse currently. Does RizomUV use some other Python version? I’m a bit confused though. Are you creating a C++ or Python connector?

I’ll check with the dev team about that about the debug build question.

RizomUV is a C++ application with a Python interpreter (version “3.7.9”) to provide scripting facilities. I’m not creating a connector / plugin / DLL file for RizomUV. I’m linking directly the Omniverse’s .lib files to rizomuv.exe. So the connection to Omniverse is C++ and will be native to RizomUV. I’m not using what you have done in Python for Omniverse.

What I observed is that as soon as my Python code is in the call stack, the following code hangs: UsdStage::Open("C:/Users/arquier/TMP/sphere.usd");
Otherwise everything run fine.

So I guess there is a incompatibility that creates a something that look likes a deadlock situation. I’m still investigating.