-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
viewer ERROR: mj_stackAlloc: out of memory, stack overflow #2305
Comments
To clarify, this is happening with 3.2.6 or at HEAD? |
my mujoco version shows 3.2.7. Maybe I updated too fast. |
I think MJX should only be used from official releases, rather than from head? @btaba is that right? |
The MJX and MuJoCo versions should match. Since you are using the latest version of MuJoCo, you'll want to I'm not sure this will fix the |
Hey Btaba, thanks for the quick reply. I will try to get the full traceback today. Since I modified both mujoco and mjx to support my muscle model. I have to build from sketch. Here is my building script. Instructions
The script worked for the last 8 months. I only got the viewer error 2 days ago. |
I can only trace back to line 428 simulate.render_loop() in the viewer.py. After that is the C++ code that I can't trace back in the python environment. |
I think I know what the issue is. There was a memory leak that was fixed 4 days ago in 3f855f3, if you sync to current HEAD, this should go away. |
Sorry for the faff, I know this is a pain, can you do a binary search to see which commit is responsible? The only one that changed stack allocation is "Disable tendon caternary..." which introduced a memory leak and then that was fixed by "Fix stack allocation leak...". Stack allocation was also changed by 2691887, and I can see the new message from here, but stack mis-allocations are supposed to now print a line number and function as you can see here, but you're not getting those. Why not? It's very strange... |
Also, how many tendons do you have in your model? Could it be 6? Because the memory leak was from If that's the case then it would imply that either the fix is bad (I don't think it is), or you somehow didn't really sync to HEAD... perhaps you just need to delete your build directory and try again? |
Intro
Hi!
I am a graduate student at MIT, I use mjx for my exoskeleton research.
My setup
I'm using my custom MJX (with muscle model with flexible tendon), most of which is the same as the default MJX. Python3.11, ubuntu 2404, nvidia 4070
What's happening? What did you expect?
I just merged my code with the newest main mujoco repo. After successful compile and testing. When I run the viewer I get this error:
ERROR: mj_stackAlloc: out of memory, stack overflow
max = 0, available = 0, requested = 24
nefc = 0, ncon = 0
Press Enter to exit ...
There was a similar issue #1280 but the solution wasn't mentioned.
Steps for reproduction
the following is similar to the standard code to run the passive viewer
Please ignore the code related to the muscle.
Confirmations
The text was updated successfully, but these errors were encountered: