-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Intro
Hi!
I am a graduate student at University of Ljubljana, I use MuJoCo for RL.
My setup
MuJoCo 3.3.5, C API, x86_64, Ubuntu 24.04.3 LTS (Kubuntu).
What's happening? What did you expect?
When trying to add a real file to the virtual file system and the directory
is given argument NULL, an exception basic_string: construction from null is not valid
is thrown,
before crashing.
Based on the documentation, the directory
parameter is allowed to be NULL:
mj_addFileVFS
int mj_addFileVFS(mjVFS* vfs, const char* directory, const char* filename);
Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 2 on name collision, or -1 when an internal error occurs.Nullable: directory
Steps for reproduction
Try to pass NULL as the directory
parameter in mj_addFileVFS.
Minimal model for reproduction
No model is used.
Code required for reproduction
int main(int argc, char** argv) {
mjVFS vfs;
mj_defaultVFS(&vfs);
mj_addFileVFS(&vfs, NULL, "test.c");
mj_deleteVFS(&vfs);
return 0;
}
Confirmations
- I searched the latest documentation thoroughly before posting.
- I searched previous Issues and Discussions, I am certain this has not been raised before.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working