USD: Assert in io_usd_import unittest #122606

Closed
opened 2024-06-01 20:41:57 +02:00 by Bastien Montagne · 1 comment

System Information
Operating system: N/A
Graphics card: N/A

Blender Version
Broken: Current main
Worked: ??

Short description of error

Running the io_usd_import unittest in a debug build fails in current main code due to an assert.

Backtrace:

4   _BLI_assert_abort                                    BLI_assert.c           51   0x15e1e21e     
5   blender::GMutableSpan::typed<int>                    BLI_generic_span.hh    215  0x1173b997     
6   blender::io::usd::copy_primvar_to_blender_attribute  usd_attribute_utils.cc 108  0x1bfeaaad     
7   blender::io::usd::USDCurvesReader::read_custom_data  usd_reader_curve.cc    320  0x1c1cd451     
8   blender::io::usd::USDCurvesReader::read_curve_sample usd_reader_curve.cc    288  0x1c1c971b     
9   blender::io::usd::USDCurvesReader::read_object_data  usd_reader_curve.cc    145  0x1c1c4292     
10  blender::io::usd::import_startjob                    usd_capi_import.cc     346  0x1c07f02a     
11  blender::io::usd::USD_import                         usd_capi_import.cc     538  0x1c07a0a2     
12  wm_usd_import_exec                                   io_usd.cc              849  0x1e4b45a3     
13  wm_operator_invoke                                   wm_event_system.cc     1586 0x16e6fab0     
14  wm_operator_call_internal                            wm_event_system.cc     1809 0x16e2d21c     
15  WM_operator_call_py                                  wm_event_system.cc     1886 0x16e30047     
16  pyop_call                                            bpy_operator.cc        249  0x1ad1544e     

More Info

From what I can understand, USD Curves importer code (USDCurvesReader::read_custom_data) tries to create a "normal_mode" attribute, which is a built-in one in Blender. USD importer tries to get such attribute as an int32_t, but Blender defines it as CD_PROP_INT8. So the returned attribute data by attributes.lookup_or_add_for_write_span is empty/invalid.

**System Information** Operating system: N/A Graphics card: N/A **Blender Version** Broken: Current `main` Worked: ?? **Short description of error** Running the `io_usd_import` unittest in a debug build fails in current `main` code due to an assert. Backtrace: ``` 4 _BLI_assert_abort BLI_assert.c 51 0x15e1e21e 5 blender::GMutableSpan::typed<int> BLI_generic_span.hh 215 0x1173b997 6 blender::io::usd::copy_primvar_to_blender_attribute usd_attribute_utils.cc 108 0x1bfeaaad 7 blender::io::usd::USDCurvesReader::read_custom_data usd_reader_curve.cc 320 0x1c1cd451 8 blender::io::usd::USDCurvesReader::read_curve_sample usd_reader_curve.cc 288 0x1c1c971b 9 blender::io::usd::USDCurvesReader::read_object_data usd_reader_curve.cc 145 0x1c1c4292 10 blender::io::usd::import_startjob usd_capi_import.cc 346 0x1c07f02a 11 blender::io::usd::USD_import usd_capi_import.cc 538 0x1c07a0a2 12 wm_usd_import_exec io_usd.cc 849 0x1e4b45a3 13 wm_operator_invoke wm_event_system.cc 1586 0x16e6fab0 14 wm_operator_call_internal wm_event_system.cc 1809 0x16e2d21c 15 WM_operator_call_py wm_event_system.cc 1886 0x16e30047 16 pyop_call bpy_operator.cc 249 0x1ad1544e ``` **More Info** From what I can understand, USD Curves importer code (`USDCurvesReader::read_custom_data`) tries to create a `"normal_mode"` attribute, which is a built-in one in Blender. USD importer tries to get such attribute as an `int32_t`, but Blender defines it as `CD_PROP_INT8`. So the returned attribute data by `attributes.lookup_or_add_for_write_span` is empty/invalid.
Bastien Montagne added the
Type
Bug
Status
Confirmed
Severity
Normal
labels 2024-06-01 20:41:58 +02:00
Bastien Montagne added this to the USD project 2024-06-01 20:41:58 +02:00
Author
Owner
@deadpin @makowalski FYI.
Iliya Katushenock added the
Module
Pipeline, Assets & IO
label 2024-06-01 20:44:02 +02:00
Jesse Yurkovich self-assigned this 2024-06-01 21:19:51 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-06-02 22:26:29 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
1 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#122606
No description provided.