Fix MjSpec zip includes, deep-copy attach assets, and WASM lifetimes - #3441
Open
Ayush7614 wants to merge 1 commit into
Open
Fix MjSpec zip includes, deep-copy attach assets, and WASM lifetimes#3441Ayush7614 wants to merge 1 commit into
Ayush7614 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
from_zip now selects a root XML and passes sibling XML members as includes; deep-copy attach prefixes mesh/texture files on the parent instead of the child; default MjvScene no longer null-dereferences model accessors; and MjVFS frees its wrapper allocation after mj_deleteVFS.
Ayush7614
force-pushed
the
fix/mjspec-zip-attach-wasm-lifetime
branch
from
July 28, 2026 21:47
2d5f33f to
c191cfa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MjSpec.from_zipnow keeps sibling XML members and passes them asinclude=after selecting a non-included root XML (previously every.xmlentry overwrote the root and includes were dropped).attachprefixes mesh/texturefilefields on the parent after attach, so in-memory assets resolve; the child stays reusable for later deep-copy attaches.MjvScene()initializesmodel = nullptrand returns empty views instead of null-dereferencing model-backed accessors;MjVFSdestructordeletes the wrapper aftermj_deleteVFS.Distinct from #3104 / PR #3372 (those cover
to_zipfile-referenced assets). No existing issue claimed for these paths.Test plan
from_zipstill loadstestdata/MJCF_Root.zipandMJCF_NoRoot.ziptest_from_zip_with_includes)test_deepcopy_attach_renames_parent_asset_files) — needs CI Python bindings build