Fixes failing CI test for mock interfaces#5036
Fixes failing CI test for mock interfaces#5036AntoineRichard wants to merge 4 commits intoisaac-sim:developfrom
Conversation
Greptile SummaryThis PR fixes flaky CI tests ( The fix caches the default arrays in instance attributes (
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Property accessed<br/>(e.g., root_com_lin_vel_w)"] --> B["Calls parent property<br/>(e.g., root_com_vel_w)"]
B --> C{"self._field<br/>is None?"}
C -->|"Yes (before fix)"| D["return wp.zeros(...).view()<br/>Temporary created"]
D --> E["Temporary may be GC'd"]
E --> F["wp.array(ptr=v.ptr, ...)<br/>Dangling pointer!"]
F --> G["❌ Use-after-free:<br/>garbage data"]
C -->|"Yes (after fix)"| H["self._field = wp.zeros(...).view()<br/>Cached on instance"]
H --> I["wp.array(ptr=v.ptr, ...)<br/>Pointer stays valid"]
I --> J["✅ Correct data returned"]
C -->|No| K["Return cached self._field"]
K --> I
|
Description
Fixes failing CI test for mock interfaces. This was caused by some pointers being deleted by the garbage collector.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there