Opening a blend file that has objects with animation transform cache previously imported from a USD will crash if the animation in the USD is missing afterwards #113400

Closed
opened 2023-10-07 22:29:15 +02:00 by Omar-Mokhtar · 16 comments

System Information
Operating system: Linux
Graphics card: NVIDIA RTX 3050

Blender Version
Broken:
Blender 4.1.0 Alpha
build date: 2023-10-07
build time: 22:23:53
build commit date: 2023-10-07
build commit time: 15:12
build hash: 8c1c782853
build platform: Linux
build type: Release

Worked: (I'll test it with earlier commits and update this part)

Short description of error
Blender crashes once I open this project. It's in the attachments.

This is in the logs:

../src/intel/isl/isl.c:2235: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.
Read blend: "/home/omar/blender_projects/test1/crashing.blend"
terminate called after throwing an instance of 'pxrInternal_v0_23__pxrReserved__::UsdExpiredPrimAccessError'
what(): Used null prim
Aborted (core dumped)

Exact steps for others to reproduce the error
Just open the project in the attachments. It'll crash immediately.

Edit: More accurate steps in this comment: #113400 (comment)

I'll continue debugging and see why this is happening.

**System Information** Operating system: Linux Graphics card: NVIDIA RTX 3050 **Blender Version** Broken: Blender 4.1.0 Alpha build date: 2023-10-07 build time: 22:23:53 build commit date: 2023-10-07 build commit time: 15:12 build hash: 8c1c7828535a build platform: Linux build type: Release Worked: (I'll test it with earlier commits and update this part) **Short description of error** Blender crashes once I open this project. It's in the attachments. This is in the logs: ../src/intel/isl/isl.c:2235: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available. Read blend: "/home/omar/blender_projects/test1/crashing.blend" terminate called after throwing an instance of 'pxrInternal_v0_23__pxrReserved__::UsdExpiredPrimAccessError' what(): Used null prim Aborted (core dumped) **Exact steps for others to reproduce the error** Just open the project in the attachments. It'll crash immediately. **Edit: More accurate steps in this comment**: https://projects.blender.org/blender/blender/issues/113400#issuecomment-1039931 I'll continue debugging and see why this is happening.
Omar-Mokhtar added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-10-07 22:29:15 +02:00
Iliya Katushenock added the
Interest
USD
label 2023-10-07 22:30:08 +02:00
Author

Stack trace from GDB:

#0 0x00007fffed7f5c6b in raise () from /lib64/libc.so.6
#1 0x00007fffed7f7305 in abort () from /lib64/libc.so.6
#2 0x00007fffeda70735 in ?? () from /usr/lib64/libstdc++.so.6
#3 0x00007fffeda7bdbc in ?? () from /usr/lib64/libstdc++.so.6
#4 0x00007fffeda7be27 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5 0x00007fffeda7c0db in __cxa_rethrow () from /usr/lib64/libstdc++.so.6
#6 0x00000000014878ad in tbb::internal::task_group_base::wait (this=0x7fffa3ee42c0)
at /home/omar/blender-git/lib/linux_x86_64_glibc_228/tbb/include/tbb/task_group.h:171
#7 0x0000000001486e2d in tbb_task_pool_work_and_wait (pool=0x7fffa3ee4288)
at /home/omar/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:239
#8 0x0000000001487453 in BLI_task_pool_work_and_wait (pool=0x7fffa3ee4288)
at /home/omar/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:472
#9 0x000000000186b3b2 in blender::deg::(anonymous namespace)::evaluate_graph_threaded_stage (state=0x7fffffffc4c0,
task_pool=0x7fffa3ee4288, stage=blender::deg::(anonymous namespace)::EvaluationStage::THREADED_EVALUATION)
at /home/omar/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:324
#10 0x000000000186b705 in blender::deg::deg_evaluate_on_refresh (graph=0x7fffdb4e0c08)
at /home/omar/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:446
#11 0x00000000018306d3 in deg_flush_updates_and_refresh (deg_graph=0x7fffdb4e0c08)
at /home/omar/blender-git/blender/source/blender/depsgraph/intern/depsgraph_eval.cc:45
#12 0x00000000018307a8 in DEG_evaluate_on_refresh (graph=0x7fffdb4e0c08)
at /home/omar/blender-git/blender/source/blender/depsgraph/intern/depsgraph_eval.cc:69
#13 0x0000000000b06c8b in scene_graph_update_tagged (depsgraph=0x7fffdb4e0c08, bmain=0x7fffa5d87308, only_if_tagged=false)
at /home/omar/blender-git/blender/source/blender/blenkernel/intern/scene.cc:2564
#14 0x0000000000b06d78 in BKE_scene_graph_update_tagged (depsgraph=0x7fffdb4e0c08, bmain=0x7fffa5d87308)
at /home/omar/blender-git/blender/source/blender/blenkernel/intern/scene.cc:2613
#15 0x00000000014a6f8f in wm_event_do_depsgraph (C=0x7fffe985c388, is_after_open_file=true)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:471
#16 0x00000000014b9dde in wm_file_read_post (C=0x7fffe985c388,
filepath=0x7fffffffc840 "/home/omar/blender_projects/test1/crashing.blend", params=0x7fffffffc79c)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:777
#17 0x00000000014ba897 in WM_file_read (C=0x7fffe985c388, filepath=0x7fffffffc840 "/home/omar/blender_projects/test1/crashing.blend",
reports=0x7fffea2c9a68) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:1068
#18 0x00000000014be883 in wm_file_read_opwrap (C=0x7fffe985c388,
--Type for more, q to quit, c to continue without paging--
filepath=0x7fffffffc840 "/home/omar/blender_projects/test1/crashing.blend", reports=0x7fffea2c9a68)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2742
#19 0x00000000014bedd2 in wm_open_mainfile__open (C=0x7fffe985c388, op=0x7fff78283908)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2865
#20 0x00000000014be9ea in operator_state_dispatch (C=0x7fffe985c388, op=0x7fff78283908,
targets=0x13224900 <wm_open_mainfile_dispatch_targets>)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2778
#21 0x00000000014bee8a in wm_open_mainfile_dispatch (C=0x7fffe985c388, op=0x7fff78283908)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2889
#22 0x00000000014beb4a in wm_open_mainfile__discard_changes (C=0x7fffe985c388, op=0x7fff78283908)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2817
#23 0x00000000014be9ea in operator_state_dispatch (C=0x7fffe985c388, op=0x7fff78283908,
targets=0x13224900 <wm_open_mainfile_dispatch_targets>)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2778
#24 0x00000000014bee8a in wm_open_mainfile_dispatch (C=0x7fffe985c388, op=0x7fff78283908)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2889
#25 0x00000000014beeb7 in wm_open_mainfile_invoke (C=0x7fffe985c388, op=0x7fff78283908)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2894
#26 0x00000000014a9b1a in wm_operator_invoke (C=0x7fffe985c388, ot=0x7fffe97c8908, event=0x7fffdb2d3968, properties=0x7fffffffd5f0,
reports=0x0, poll_only=false, use_last_properties=true)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1533
#27 0x00000000014aa3e7 in wm_operator_call_internal (C=0x7fffe985c388, ot=0x7fffe97c8908, properties=0x7fffffffd5f0, reports=0x0,
context=WM_OP_INVOKE_DEFAULT, poll_only=false, event=0x7fffdb2d3968)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1768
#28 0x00000000014aa494 in WM_operator_name_call_ptr (C=0x7fffe985c388, ot=0x7fffe97c8908, context=WM_OP_INVOKE_DEFAULT,
properties=0x7fffffffd5f0, event=0x0)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1782
#29 0x00000000014aaa97 in WM_operator_name_call_ptr_with_depends_on_cursor (C=0x7fffe985c388, ot=0x7fffe97c8908,
opcontext=WM_OP_INVOKE_DEFAULT, properties=0x7fffffffd5f0, event=0x0, drawstr=0x7fffffffd458 "crashing.blend")
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1971
#30 0x00000000021354b0 in ui_apply_but_funcs_after (C=0x7fffe985c388)
at /home/omar/blender-git/blender/source/blender/editors/interface/interface_handlers.cc:1039
#31 0x0000000002152e46 in ui_popup_handler (C=0x7fffe985c388, event=0x7fff7b71dad8, userdata=0x7fffa3ee4288)
--Type for more, q to quit, c to continue without paging--
at /home/omar/blender-git/blender/source/blender/editors/interface/interface_handlers.cc:11720
#32 0x00000000014a7d80 in wm_handler_ui_call (C=0x7fffe985c388, handler=0x7fffa403dc68, event=0x7fff7b71dad8, always_pass=false)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:818
#33 0x00000000014af57f in wm_handlers_do_intern (C=0x7fffe985c388, win=0x7fffdbeb6408, event=0x7fff7b71dad8, handlers=0x7fffdbeb6530)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:3320
#34 0x00000000014afc1f in wm_handlers_do (C=0x7fffe985c388, event=0x7fff7b71dad8, handlers=0x7fffdbeb6530)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:3437
#35 0x00000000014b1ec2 in wm_event_do_handlers (C=0x7fffe985c388)
at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:4064
#36 0x000000000149f46c in WM_main (C=0x7fffe985c388) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm.cc:609
#37 0x00000000007e1179 in main (argc=1, argv=0x7fffffffdcf8) at /home/omar/blender-git/blender/source/creator/creator.cc:591

Stack trace from GDB: #0 0x00007fffed7f5c6b in raise () from /lib64/libc.so.6 #1 0x00007fffed7f7305 in abort () from /lib64/libc.so.6 #2 0x00007fffeda70735 in ?? () from /usr/lib64/libstdc++.so.6 #3 0x00007fffeda7bdbc in ?? () from /usr/lib64/libstdc++.so.6 #4 0x00007fffeda7be27 in std::terminate() () from /usr/lib64/libstdc++.so.6 #5 0x00007fffeda7c0db in __cxa_rethrow () from /usr/lib64/libstdc++.so.6 #6 0x00000000014878ad in tbb::internal::task_group_base::wait (this=0x7fffa3ee42c0) at /home/omar/blender-git/lib/linux_x86_64_glibc_228/tbb/include/tbb/task_group.h:171 #7 0x0000000001486e2d in tbb_task_pool_work_and_wait (pool=0x7fffa3ee4288) at /home/omar/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:239 #8 0x0000000001487453 in BLI_task_pool_work_and_wait (pool=0x7fffa3ee4288) at /home/omar/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:472 #9 0x000000000186b3b2 in blender::deg::(anonymous namespace)::evaluate_graph_threaded_stage (state=0x7fffffffc4c0, task_pool=0x7fffa3ee4288, stage=blender::deg::(anonymous namespace)::EvaluationStage::THREADED_EVALUATION) at /home/omar/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:324 #10 0x000000000186b705 in blender::deg::deg_evaluate_on_refresh (graph=0x7fffdb4e0c08) at /home/omar/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:446 #11 0x00000000018306d3 in deg_flush_updates_and_refresh (deg_graph=0x7fffdb4e0c08) at /home/omar/blender-git/blender/source/blender/depsgraph/intern/depsgraph_eval.cc:45 #12 0x00000000018307a8 in DEG_evaluate_on_refresh (graph=0x7fffdb4e0c08) at /home/omar/blender-git/blender/source/blender/depsgraph/intern/depsgraph_eval.cc:69 #13 0x0000000000b06c8b in scene_graph_update_tagged (depsgraph=0x7fffdb4e0c08, bmain=0x7fffa5d87308, only_if_tagged=false) at /home/omar/blender-git/blender/source/blender/blenkernel/intern/scene.cc:2564 #14 0x0000000000b06d78 in BKE_scene_graph_update_tagged (depsgraph=0x7fffdb4e0c08, bmain=0x7fffa5d87308) at /home/omar/blender-git/blender/source/blender/blenkernel/intern/scene.cc:2613 #15 0x00000000014a6f8f in wm_event_do_depsgraph (C=0x7fffe985c388, is_after_open_file=true) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:471 #16 0x00000000014b9dde in wm_file_read_post (C=0x7fffe985c388, filepath=0x7fffffffc840 "/home/omar/blender_projects/test1/crashing.blend", params=0x7fffffffc79c) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:777 #17 0x00000000014ba897 in WM_file_read (C=0x7fffe985c388, filepath=0x7fffffffc840 "/home/omar/blender_projects/test1/crashing.blend", reports=0x7fffea2c9a68) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:1068 #18 0x00000000014be883 in wm_file_read_opwrap (C=0x7fffe985c388, --Type <RET> for more, q to quit, c to continue without paging-- filepath=0x7fffffffc840 "/home/omar/blender_projects/test1/crashing.blend", reports=0x7fffea2c9a68) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2742 #19 0x00000000014bedd2 in wm_open_mainfile__open (C=0x7fffe985c388, op=0x7fff78283908) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2865 #20 0x00000000014be9ea in operator_state_dispatch (C=0x7fffe985c388, op=0x7fff78283908, targets=0x13224900 <wm_open_mainfile_dispatch_targets>) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2778 #21 0x00000000014bee8a in wm_open_mainfile_dispatch (C=0x7fffe985c388, op=0x7fff78283908) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2889 #22 0x00000000014beb4a in wm_open_mainfile__discard_changes (C=0x7fffe985c388, op=0x7fff78283908) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2817 #23 0x00000000014be9ea in operator_state_dispatch (C=0x7fffe985c388, op=0x7fff78283908, targets=0x13224900 <wm_open_mainfile_dispatch_targets>) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2778 #24 0x00000000014bee8a in wm_open_mainfile_dispatch (C=0x7fffe985c388, op=0x7fff78283908) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2889 #25 0x00000000014beeb7 in wm_open_mainfile_invoke (C=0x7fffe985c388, op=0x7fff78283908) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_files.cc:2894 #26 0x00000000014a9b1a in wm_operator_invoke (C=0x7fffe985c388, ot=0x7fffe97c8908, event=0x7fffdb2d3968, properties=0x7fffffffd5f0, reports=0x0, poll_only=false, use_last_properties=true) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1533 #27 0x00000000014aa3e7 in wm_operator_call_internal (C=0x7fffe985c388, ot=0x7fffe97c8908, properties=0x7fffffffd5f0, reports=0x0, context=WM_OP_INVOKE_DEFAULT, poll_only=false, event=0x7fffdb2d3968) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1768 #28 0x00000000014aa494 in WM_operator_name_call_ptr (C=0x7fffe985c388, ot=0x7fffe97c8908, context=WM_OP_INVOKE_DEFAULT, properties=0x7fffffffd5f0, event=0x0) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1782 #29 0x00000000014aaa97 in WM_operator_name_call_ptr_with_depends_on_cursor (C=0x7fffe985c388, ot=0x7fffe97c8908, opcontext=WM_OP_INVOKE_DEFAULT, properties=0x7fffffffd5f0, event=0x0, drawstr=0x7fffffffd458 "crashing.blend") at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:1971 #30 0x00000000021354b0 in ui_apply_but_funcs_after (C=0x7fffe985c388) at /home/omar/blender-git/blender/source/blender/editors/interface/interface_handlers.cc:1039 #31 0x0000000002152e46 in ui_popup_handler (C=0x7fffe985c388, event=0x7fff7b71dad8, userdata=0x7fffa3ee4288) --Type <RET> for more, q to quit, c to continue without paging-- at /home/omar/blender-git/blender/source/blender/editors/interface/interface_handlers.cc:11720 #32 0x00000000014a7d80 in wm_handler_ui_call (C=0x7fffe985c388, handler=0x7fffa403dc68, event=0x7fff7b71dad8, always_pass=false) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:818 #33 0x00000000014af57f in wm_handlers_do_intern (C=0x7fffe985c388, win=0x7fffdbeb6408, event=0x7fff7b71dad8, handlers=0x7fffdbeb6530) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:3320 #34 0x00000000014afc1f in wm_handlers_do (C=0x7fffe985c388, event=0x7fff7b71dad8, handlers=0x7fffdbeb6530) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:3437 #35 0x00000000014b1ec2 in wm_event_do_handlers (C=0x7fffe985c388) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.cc:4064 #36 0x000000000149f46c in WM_main (C=0x7fffe985c388) at /home/omar/blender-git/blender/source/blender/windowmanager/intern/wm.cc:609 #37 0x00000000007e1179 in main (argc=1, argv=0x7fffffffdcf8) at /home/omar/blender-git/blender/source/creator/creator.cc:591
Member

Does not crash in 4.1 5c98d53125, not 4.0 66c05fe368, will check earlier.

Does not crash in 4.1 5c98d53125b5f68ebeae4053686e2, not 4.0 66c05fe3689f, will check earlier.
Author

I pulled that exact version (5c98d53125) and it's crashing. Here's the entire system info file

I pulled that exact version (5c98d53125b5) and it's crashing. Here's the entire system info file
Author

Does not crash in 4.1 5c98d53125, not 4.0 66c05fe368, will check earlier.

@ChengduLittleA
If it didn't crash on your machine, did it show any warnings or errors about the content of the file? Maybe that'll tell us something.

> Does not crash in 4.1 5c98d53125b5f68ebeae4053686e2, not 4.0 66c05fe3689f, will check earlier. @ChengduLittleA If it didn't crash on your machine, did it show any warnings or errors about the content of the file? Maybe that'll tell us something.
Member

It does show

Runtime Error (secondary thread): in Open at line 873 of /src/build_linux/deps/build/usd/src/external_usd/pxr/usd/usd/stage.cpp -- Failed to open layer @/home/cuda_test/monkey.usdc@

in the terminal, and from the crash log, pxrInternal_v0_23__pxrReserved__ could be related to USD, but here it's not crashing. It could be related to that /home/cuda_test/monkey.usdc file, since it's not present on my machine, it may not trigger the crash.

It does show ``` Runtime Error (secondary thread): in Open at line 873 of /src/build_linux/deps/build/usd/src/external_usd/pxr/usd/usd/stage.cpp -- Failed to open layer @/home/cuda_test/monkey.usdc@ ``` in the terminal, and from the crash log, `pxrInternal_v0_23__pxrReserved__` could be related to USD, but here it's not crashing. It could be related to that `/home/cuda_test/monkey.usdc` file, since it's not present on my machine, it may not trigger the crash.
Author

Oh I didn't know it still remembers which USD file it was imported from. Interesting ...

Oh I didn't know it still remembers which USD file it was imported from. Interesting ...
Author

Actually when I deleted (or renamed) that file, it's no longer crashing. So it's probably expecting this file to contain something but it has been overwritten (contains a whole different scene).

Actually when I deleted (or renamed) that file, it's no longer crashing. So it's probably expecting this file to contain something but it has been overwritten (contains a whole different scene).
Author

I found a more consistent way to reproduce it:

  1. Create a blender project where the Camera has keyframes. Let's call it Project A
  2. Export Project A as USD. Make sure to export the animations too.
  3. Create a new empty project and import that USD file to it. Let's call it Project B.
  4. Create a third blender project. Rename all the objects to something else so that there are no common names with Project A. Let's call it Project C.
  5. Export Project C to the same USD file.
  6. Open Project B (Now it's linked to the USD file and expecting to see the objects from Project A but they're actually from Project C).
  7. Crash ..

I have attached all these projects and the exported USD file

I found a more consistent way to reproduce it: 1) Create a blender project where the Camera has keyframes. Let's call it Project A 2) Export Project A as USD. Make sure to export the animations too. 3) Create a new empty project and import that USD file to it. Let's call it Project B. 4) Create a third blender project. Rename all the objects to something else so that there are no common names with Project A. Let's call it Project C. 5) Export Project C to the same USD file. 6) Open Project B (Now it's linked to the USD file and expecting to see the objects from Project A but they're actually from Project C). 7) Crash .. I have attached all these projects and the exported USD file
Member

Will check in a bit. Thanks for the additional information

Will check in a bit. Thanks for the additional information
Member

Can confirm with your step :D it's not necessary to save project A and C, just B is enough.

  • Default file
  • Insert key frame on camera
  • Export to USD (with animation)
  • New default file, delete everything
  • Import that USD
  • Save as blend
  • New default file, rename everything so there's no objects that had the same name as the original default file
  • Export and overwrite the USD
  • Open the blend file you saved

Crashed in CacheReader_open_usd_object. Seems to be a internal problem with USD.

libc.so.6!__pthread_kill_implementation(int no_tid, int signo, pthread_t threadid) (pthread_kill.c:44)
libc.so.6!__pthread_kill_internal(int signo, pthread_t threadid) (pthread_kill.c:78)
libc.so.6!__GI___pthread_kill(pthread_t threadid, int signo) (pthread_kill.c:89)
libc.so.6!__GI_raise(int sig) (raise.c:26)
libc.so.6!__GI_abort() (abort.c:79)
libstdc++.so.6![Unknown/Just-In-Time compiled code] (未知源:0)
libstdc++.so.6!std::terminate() (未知源:0)
libstdc++.so.6!__cxa_throw (未知源:0)
libusd_ms.so!void pxrInternal_v0_23__pxrReserved__::TfFunctionRef<void ()>::_InvokeFn<pxrInternal_v0_23__pxrReserved__::Tf_Throw<pxrInternal_v0_23__pxrReserved__::UsdExpiredPrimAccessError, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(pxrInternal_v0_23__pxrReserved__::TfCallContext const&, pxrInternal_v0_23__pxrReserved__::TfSkipCallerFrames, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)::{lambda()#1}>(void const*) (未知源:0)
libusd_ms.so!pxrInternal_v0_23__pxrReserved__::Usd_ThrowExpiredPrimAccessError(pxrInternal_v0_23__pxrReserved__::Usd_PrimData const*) (未知源:0)
libusd_ms.so!pxrInternal_v0_23__pxrReserved__::UsdPrim::_IsA(pxrInternal_v0_23__pxrReserved__::UsdSchemaRegistry::SchemaInfo const*) const (未知源:0)
pxrInternal_v0_23__pxrReserved__::UsdPrim::IsA<pxrInternal_v0_23__pxrReserved__::UsdGeomCapsule>(const pxrInternal_v0_23__pxrReserved__::UsdPrim * const this) (/home/yiming/Documents/Sources/BlenderMain/lib/linux_x86_64_glibc_228/usd/include/pxr/usd/usd/prim.h:553)
blender::io::usd::USDStageReader::is_primitive_prim(const blender::io::usd::USDStageReader * const this, const pxrInternal_v0_23__pxrReserved__::UsdPrim & prim) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/io/usd/intern/usd_reader_stage.cc:73)
blender::io::usd::USDStageReader::create_reader(blender::io::usd::USDStageReader * const this, const pxrInternal_v0_23__pxrReserved__::UsdPrim & prim) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/io/usd/intern/usd_reader_stage.cc:119)
CacheReader_open_usd_object(CacheArchiveHandle * handle, CacheReader * reader, Object * object, const char * object_path) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/io/usd/intern/usd_capi_import.cc:561)
BKE_cachefile_reader_open(CacheFile * cache_file, CacheReader ** reader, Object * object, const char * object_path) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/cachefile.cc:191)
transformcache_evaluate(bConstraint * con, bConstraintOb * cob, ListBase * targets) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/constraint.cc:5383)
BKE_constraints_solve(Depsgraph * depsgraph, ListBase * conlist, bConstraintOb * cob, float ctime) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/constraint.cc:6419)
BKE_object_eval_constraints(Depsgraph * depsgraph, Scene * scene, Object * ob) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/object_update.cc:122)
operator()(const struct {...} * const __closure, Depsgraph * depsgraph) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc:1098)
Can confirm with your step :D it's not necessary to save project A and C, just B is enough. - Default file - Insert key frame on camera - Export to USD (with animation) - New default file, delete everything - Import that USD - Save as blend - New default file, rename everything so there's no objects that had the same name as the original default file - Export and overwrite the USD - Open the blend file you saved Crashed in `CacheReader_open_usd_object`. Seems to be a internal problem with USD. ``` libc.so.6!__pthread_kill_implementation(int no_tid, int signo, pthread_t threadid) (pthread_kill.c:44) libc.so.6!__pthread_kill_internal(int signo, pthread_t threadid) (pthread_kill.c:78) libc.so.6!__GI___pthread_kill(pthread_t threadid, int signo) (pthread_kill.c:89) libc.so.6!__GI_raise(int sig) (raise.c:26) libc.so.6!__GI_abort() (abort.c:79) libstdc++.so.6![Unknown/Just-In-Time compiled code] (未知源:0) libstdc++.so.6!std::terminate() (未知源:0) libstdc++.so.6!__cxa_throw (未知源:0) libusd_ms.so!void pxrInternal_v0_23__pxrReserved__::TfFunctionRef<void ()>::_InvokeFn<pxrInternal_v0_23__pxrReserved__::Tf_Throw<pxrInternal_v0_23__pxrReserved__::UsdExpiredPrimAccessError, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(pxrInternal_v0_23__pxrReserved__::TfCallContext const&, pxrInternal_v0_23__pxrReserved__::TfSkipCallerFrames, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)::{lambda()#1}>(void const*) (未知源:0) libusd_ms.so!pxrInternal_v0_23__pxrReserved__::Usd_ThrowExpiredPrimAccessError(pxrInternal_v0_23__pxrReserved__::Usd_PrimData const*) (未知源:0) libusd_ms.so!pxrInternal_v0_23__pxrReserved__::UsdPrim::_IsA(pxrInternal_v0_23__pxrReserved__::UsdSchemaRegistry::SchemaInfo const*) const (未知源:0) pxrInternal_v0_23__pxrReserved__::UsdPrim::IsA<pxrInternal_v0_23__pxrReserved__::UsdGeomCapsule>(const pxrInternal_v0_23__pxrReserved__::UsdPrim * const this) (/home/yiming/Documents/Sources/BlenderMain/lib/linux_x86_64_glibc_228/usd/include/pxr/usd/usd/prim.h:553) blender::io::usd::USDStageReader::is_primitive_prim(const blender::io::usd::USDStageReader * const this, const pxrInternal_v0_23__pxrReserved__::UsdPrim & prim) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/io/usd/intern/usd_reader_stage.cc:73) blender::io::usd::USDStageReader::create_reader(blender::io::usd::USDStageReader * const this, const pxrInternal_v0_23__pxrReserved__::UsdPrim & prim) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/io/usd/intern/usd_reader_stage.cc:119) CacheReader_open_usd_object(CacheArchiveHandle * handle, CacheReader * reader, Object * object, const char * object_path) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/io/usd/intern/usd_capi_import.cc:561) BKE_cachefile_reader_open(CacheFile * cache_file, CacheReader ** reader, Object * object, const char * object_path) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/cachefile.cc:191) transformcache_evaluate(bConstraint * con, bConstraintOb * cob, ListBase * targets) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/constraint.cc:5383) BKE_constraints_solve(Depsgraph * depsgraph, ListBase * conlist, bConstraintOb * cob, float ctime) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/constraint.cc:6419) BKE_object_eval_constraints(Depsgraph * depsgraph, Scene * scene, Object * ob) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/blenkernel/intern/object_update.cc:122) operator()(const struct {...} * const __closure, Depsgraph * depsgraph) (/home/yiming/Documents/Sources/BlenderMain/blender/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc:1098) ```
YimingWu added
Module
Pipeline, Assets & IO
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-10-08 16:02:49 +02:00
YimingWu changed title from A crash once this file is opened to Opening a blend file that has objects previously imported from a USD will crash if the object name in the USD is changed afterwards 2023-10-08 16:05:00 +02:00
Author

I see that a simple try and catch around usd_reader = archive->create_reader(prim); would just avoid the crash. And in an exception we just return a nullptr.

But in general, I don't like the idea of referencing an external file. I mean if we need that file to be in that format, why not just have an internal copy inside the blender project file? Because it's very likely that users and 3rd party applications would treat the USD files as temporary disposable files that could be deleted or overwritten after they serve their purpose.

I see that a simple try and catch around `usd_reader = archive->create_reader(prim);` would just avoid the crash. And in an exception we just return a nullptr. But in general, I don't like the idea of referencing an external file. I mean if we need that file to be in that format, why not just have an internal copy inside the blender project file? Because it's very likely that users and 3rd party applications would treat the USD files as temporary disposable files that could be deleted or overwritten after they serve their purpose.
Member

I'm not quite sure about why it needs to reference a external file, it may has some other design concerns like project sync (which I doubt). I think the best thing we could do find out what exactly is triggering the problem than to simply have a catch-all.

I'm not quite sure about why it needs to reference a external file, it may has some other design concerns like project sync (which I doubt). I think the best thing we could do find out what exactly is triggering the problem than to simply have a catch-all.
Member

After some digging, now looks like that this reference is essentially caused by the Transform Cache which will use the USD as the transformation sequence as the source file to load animation, so this is where the reference comes from. It still should not crash it.

@makowalski maybe you could check?

After some digging, now looks like that this reference is essentially caused by the Transform Cache which will use the USD as the transformation sequence as the source file to load animation, so this is where the reference comes from. It still should not crash it. @makowalski maybe you could check?
YimingWu changed title from Opening a blend file that has objects previously imported from a USD will crash if the object name in the USD is changed afterwards to Opening a blend file that has objects with animation transform cache previously imported from a USD will crash if the animation in the USD is missing afterwards 2023-10-08 16:32:58 +02:00

I'm taking a look at the issue.

I'm taking a look at the issue.

I have a local fix to the issue. Will create a pull request for this next. Thanks for reporting this, @Omar-Mokhtar.

I have a local fix to the issue. Will create a pull request for this next. Thanks for reporting this, @Omar-Mokhtar.
Michael Kowalski self-assigned this 2023-10-10 23:34:29 +02:00
Michael Kowalski added this to the USD project 2023-10-10 23:34:37 +02:00

I created pull request #113524 into the 4.0 release branch to address this issue.

I created pull request https://projects.blender.org/blender/blender/pulls/113524 into the 4.0 release branch to address this issue.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-11 16:21:32 +02:00
Bastien Montagne removed this from the USD project 2023-11-02 16:13:15 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#113400
No description provided.