Skip to content
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

reloading McUsd.usdz can causes a segfault #1499

Open
mwestphal opened this issue Jun 28, 2024 · 2 comments
Open

reloading McUsd.usdz can causes a segfault #1499

mwestphal opened this issue Jun 28, 2024 · 2 comments
Labels
source:usd type:bug Something isn't working
Milestone

Comments

@mwestphal
Copy link
Contributor

mwestphal commented Jun 28, 2024

Describe the bug
reloading McUsd.usdz causes a segfault.

Looks like some kinds of reentrance or memory issue in OpenUSD

To Reproduce
Steps to reproduce the behavior:

  1. Open the file using f3d --dry-run McUsd.usdz
  2. press up arrow until segfault
  3. segfault is not systematic but always happens on loading McUsd.usdz

Expected behavior
No segfault

System Information:

  • OS: Reproduced on linux and Windows

F3D Information
Paste the content of f3d --version: 2.4.0 and 2.5.0-RC1

Additional context
I cannot build OpenUSD locally, so backtrace is not complete:

(gdb) bt
#0  0x00007fffe7b4652e in pxrInternal_v0_24__pxrReserved__::TfDiagnosticMgr::PostWarning(pxrInternal_v0_24__pxrReserved__::TfEnum, char const*, pxrInternal_v0_24__pxrReserved__::TfCallContext const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::any, bool) const () from /usr/lib/libusd_ms.so
#1  0x00007fffe7b468ba in pxrInternal_v0_24__pxrReserved__::TfDiagnosticMgr::WarningHelper::Post(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const ()
   from /usr/lib/libusd_ms.so
#2  0x00007fffe7b469b2 in pxrInternal_v0_24__pxrReserved__::Tf_PostWarningHelper(pxrInternal_v0_24__pxrReserved__::TfCallContext const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libusd_ms.so
#3  0x00007fffe7b46aba in pxrInternal_v0_24__pxrReserved__::Tf_PostWarningHelper(pxrInternal_v0_24__pxrReserved__::TfCallContext const&, char const*, ...) () from /usr/lib/libusd_ms.so
#4  0x00007fffe8407b28 in pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::BindingsAtPrim::BindingsAtPrim(pxrInternal_v0_24__pxrReserved__::UsdPrim const&, pxrInternal_v0_24__pxrReserved__::TfToken const&, bool) () from /usr/lib/libusd_ms.so
#5  0x00007fffe840d517 in pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::ComputeBoundMaterial(tbb::detail::d1::concurrent_unordered_map<pxrInternal_v0_24__pxrReserved__::SdfPath, std::unique_ptr<pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::BindingsAtPrim, std::default_delete<pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::BindingsAtPrim> >, pxrInternal_v0_24__pxrReserved__::SdfPath::Hash, std::equal_to<pxrInternal_v0_24__pxrReserved__::SdfPath>, tbb::detail::d1::tbb_allocator<std::pair<pxrInternal_v0_24__pxrReserved__::SdfPath const, std::unique_ptr<pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::BindingsAtPrim, std::default_delete<pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::BindingsAtPrim> > > > >*, tbb::detail::d1::concurrent_unordered_map<pxrInternal_v0_24__pxrReserved__::SdfPath, std::unique_ptr<pxrInternal_v0_24__pxrReserved__::Usd_CollectionMembershipQuery<pxrInternal_v0_24__pxrReserved__::UsdObjectCollectionExpressionEvaluator>, std::default_delete<pxrInternal_v0_24__pxrReserved__::Usd_CollectionMembershipQuery<pxrInternal_v0_24__pxrReserved__::UsdObjectCollectionExpressionEvaluator> > >, pxrInternal_v0_24__pxrReserved__::SdfPath::Hash, std::equal_to<pxrInternal_v0_24__pxrReserved__::SdfPath>, tbb::detail::d1::tbb_allocator<std::pair<pxrInternal_v0_24__pxrReserved__::SdfPath const, std::unique_ptr<pxrInternal_v0_24__pxrReserved__::Usd_CollectionMembershipQuery<pxrInternal_v0_24__pxrReserved__::UsdObjectCollectionExpressionEvaluator>, std::default_delete<pxrInternal_v0_24__pxrReserved__::Usd_CollectionMembershipQuery<pxrInternal_v0_24__pxrReserved__::UsdObjectCollectionExpressionEvaluator> > > > > >*, pxrInternal_v0_24__pxrReserved__::TfToken const&, pxrInternal_v0_24__pxrReserved__::UsdRelationship*, bool) const () from /usr/lib/libusd_ms.so
#6  0x00007fffe840eb42 in pxrInternal_v0_24__pxrReserved__::UsdShadeMaterialBindingAPI::ComputeBoundMaterial(pxrInternal_v0_24__pxrReserved__::TfToken const&, pxrInternal_v0_24__pxrReserved__::UsdRelationship*, bool) const () from /usr/lib/libusd_ms.so
#7  0x00007ffff7679975 in vtkF3DUSDImporter::vtkInternals::AddActor (this=0x55555fde7680, renderer=0x555557593280, path=..., geomPrim=..., prim=..., mat=0x555557e15c10, polydata=0x55555ff49180)
    at /home/glow/dev/f3d/f3d/src/plugins/usd/module/vtkF3DUSDImporter.cxx:154
#8  0x00007ffff767cdcd in vtkF3DUSDImporter::vtkInternals::ImportNode (this=0x55555fde7680, renderer=0x555557593280, node=..., path=..., currentMatrix=0x5555576dec40)
    at /home/glow/dev/f3d/f3d/src/plugins/usd/module/vtkF3DUSDImporter.cxx:665
#9  0x00007ffff767d201 in vtkF3DUSDImporter::vtkInternals::ImportNode (this=0x55555fde7680, renderer=0x555557593280, node=..., path=..., currentMatrix=0x5555576dec40)
    at /home/glow/dev/f3d/f3d/src/plugins/usd/module/vtkF3DUSDImporter.cxx:703
#10 0x00007ffff767e005 in vtkF3DUSDImporter::vtkInternals::ImportRoot (this=0x55555fde7680, renderer=0x555557593280) at /home/glow/dev/f3d/f3d/src/plugins/usd/module/vtkF3DUSDImporter.cxx:731
#11 0x00007ffff7674b84 in vtkF3DUSDImporter::ImportActors (this=0x555557f89a50, renderer=0x555557593280) at /home/glow/dev/f3d/f3d/src/plugins/usd/module/vtkF3DUSDImporter.cxx:1239
#12 0x00007ffff1fa146e in vtkImporter::ReadData (this=0x555557f89a50) at /home/glow/dev/vtk/vtk1/src/IO/Import/vtkImporter.cxx:34
#13 0x00007ffff1fa19f4 in vtkImporter::Update (this=0x555557f89a50) at /home/glow/dev/vtk/vtk1/src/IO/Import/vtkImporter.cxx:73
#14 0x00007ffff60db117 in f3d::detail::loader_impl::loadScene (this=0x5555576cd8a0, filePath="/home/glow/dev/f3d/f3d/build/../src/testing/data/McUsd.usdz")
    at /home/glow/dev/f3d/f3d/src/library/src/loader_impl.cxx:318
#15 0x000055555568043a in F3DStarter::LoadFile (this=0x7fffffffe588, index=1, relativeIndex=true) at /home/glow/dev/f3d/f3d/src/application/F3DStarter.cxx:814
#16 0x0000555555681e16 in F3DStarter::LoadRelativeFile (this=0x7fffffffe588, index=1, restoreCamera=false) at /home/glow/dev/f3d/f3d/src/application/F3DStarter.cxx:1019
@mwestphal mwestphal added the type:bug Something isn't working label Jun 28, 2024
@mwestphal mwestphal changed the title Switching between a usd file to McUsd.usdz can causes a segfault reloading McUsd.usdz can causes a segfault Jun 28, 2024
@mwestphal
Copy link
Contributor Author

@Meakk are you able to build usd with debug symbols locally ?

@mwestphal mwestphal added this to the 3.0.0 milestone Jul 4, 2024
@Meakk
Copy link
Contributor

Meakk commented Jul 4, 2024

Not tested yet

@mwestphal mwestphal modified the milestones: 3.0.0, 3.1.0 Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source:usd type:bug Something isn't working
Projects
Status: Investigate
Development

No branches or pull requests

2 participants