syoyo / tinyusdz

Tiny, dependency-free USDZ/USDA/USDC library written in C++14
Other
453 stars 32 forks source link

[Branch "dev"] Crash when loading usd-wg vechicle "geo" models #129

Closed tellypresence closed 3 months ago

tellypresence commented 3 months ago

(update: these models load OK on rendermesh-refactor branch, should be able to close this once merged back to dev)

Steps to reproduce:

With verbose logging enabled, will see the following logged; after line renderMaterialId = -1 the application crashes

tinyusdz_repo/src/tydra/scene-access.cc:BuildXformNodeFromStageRec:2102 Not xformable
tinyusdz_repo/src/tydra/render-data.cc:MeshVisitor:2392 Material: </_wd>
tinyusdz_repo/src/stage.cc:GetPrimAtPath:97 GetPrimAtPath : /_wd(input path: </_wd>)
tinyusdz_repo/src/stage.cc:GetPrimAtPath:117 clear cache.
tinyusdz_repo/src/tydra/shader-network.cc:operator():275 GPrim has no materialBinding.
tinyusdz_repo/src/tydra/shader-network.cc:FindBoundMaterial:327 search parent: /_wd
tinyusdz_repo/src/stage.cc:GetPrimAtPath:97 GetPrimAtPath : /_wd(input path: </_wd>)
tinyusdz_repo/src/stage.cc:GetPrimAtPath:126 Found cache.
tinyusdz_repo/src/tydra/shader-network.cc:operator():275 GPrim has no materialBinding.
tinyusdz_repo/src/tydra/render-data.cc:ConvertMesh:1235 num_fvs = 1836
tinyusdz_repo/src/tydra/render-data.cc:MeshVisitor:2477 renderMaterialId = -1

Note: these models are also observed to reliably crash in similar fashion:

Please check results and see if the failure can be dealt with gracefully, thank you

syoyo commented 3 months ago

You should describe mode details on reproducing procedure and error.

At least tusdcat 4wdGeo.usd works well and does not crash.

tellypresence commented 3 months ago

NOTE: these models load OK on rendermesh-refactor branch, must have fixed something

(ignore the broken faces, that's a known separate issue)

ModelScreenshots
SolidWireframe
4wdGeo.usd
ambulanceGeo.usd
sedanGeo.usd
syoyo commented 3 months ago

tusdcat 4wdGeo.usd also works on dev branch.