PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.16k stars 1.23k forks source link

Crash saving USD file on Windows to removable volume mounted as NTFS folder #3414

Open marktucker opened 2 weeks ago

marktucker commented 2 weeks ago

Description of Issue

Tf_HasAttribute on Window has the potential to dive into an infinite recursion when faced with a directory on an NTFS volume that has been used as the mount point for a removable volume (USB drive, for example).

Steps to Reproduce

  1. On Windows, plug in a USB drive that is safe to reformat/delete all contents.
  2. From the Start Menu Choose "Create and Format Hard Disk Partitions".
  3. Find the USB Drive, RMB on it, and Choose "Delete Volume". Confirm the deletion.
  4. RMB on the unallocated USB volume and choose "New Simple Volume".
  5. On the "Assign Drive Letter or Path" page, set the USB volume to mount on "C:\UsbDrive" (C: has to be NTFS formatted to allow this).
  6. Accept the rest of the dialogs to reformat the USB drive, and verify that C:\UsbDrive exists and can be written to.
  7. Run python in a USD-capable environment and run the following code:
    from pxr import Usd
    s = Usd.Stage.CreateInMemory()
    s.Export("C:/UsbDrive/output.usda")
  8. Python will run for a long time, and eventually crash with a stack overflow.

System Information (OS, Hardware)

Windows only.

Package Versions

USD 24.03 and 24.08 have both been tested and fail the same way.

jesschimein commented 2 weeks ago

Filed as internal issue #USD-10418