Fixes failing CI test for mock interfaces#5036
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
|
Fixes failing CI test for mock interfaces. This was caused by some pointers being deleted by the garbage collector. - Bug fix (non-breaking change which fixes an issue) - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
# Description Fixes failing CI test for mock interfaces. This was caused by some pointers being deleted by the garbage collector. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
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