Skip to content
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

skeleton.setPositions causes a segmentation fault #226

Open
2 tasks done
ch3njust1n opened this issue Dec 17, 2024 · 0 comments
Open
2 tasks done

skeleton.setPositions causes a segmentation fault #226

ch3njust1n opened this issue Dec 17, 2024 · 0 comments

Comments

@ch3njust1n
Copy link

Bug Report

  • I checked the documentation and the forum but found no answer.
  • I checked to make sure that this issue has not already been filed.

Environment

  • nimblephysics v0.10.52.1
  • macOS Sonoma v14.2
  • Apple clang version 15.0.0 (clang-1500.3.9.4)

Expected Behavior

Set the joint positions without a segmentation fault.

Current Behavior

lldb python test_nimble.py
(lldb) target create "python"
Current executable set to '/opt/anaconda3/envs/nimble/bin/python' (arm64).
(lldb) settings set -- target.run-args  "test_nimble.py"
(lldb) run
Process 56467 launched: '/opt/anaconda3/envs/nimble/bin/python' (arm64)
Process 56467 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
Target 0: (python) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x000000010283ea40 _nimblephysics.so`___lldb_unnamed_symbol48811 + 428
    frame #2: 0x0000000102a1fc6c _nimblephysics.so`___lldb_unnamed_symbol53905 + 120
    frame #3: 0x0000000102841314 _nimblephysics.so`___lldb_unnamed_symbol48833 + 4168
    frame #4: 0x00000001000b5c94 python`cfunction_call + 60
    frame #5: 0x000000010005ab14 python`_PyObject_MakeTpCall + 348
    frame #6: 0x0000000100061434 python`method_vectorcall + 604
    frame #7: 0x000000010016d250 python`_PyEval_EvalFrameDefault + 39412
    frame #8: 0x00000001001619f4 python`_PyEval_EvalCode + 696
    frame #9: 0x00000001001d6ba4 python`run_mod + 188
    frame #10: 0x00000001001d5414 python`pyrun_file + 176
    frame #11: 0x00000001001d4e84 python`pyrun_simple_file + 352
    frame #12: 0x00000001001d4ce4 python`PyRun_SimpleFileExFlags + 64
    frame #13: 0x00000001001f79ac python`pymain_run_file + 264
    frame #14: 0x00000001001f6fe0 python`pymain_run_python + 360
    frame #15: 0x00000001001f6e20 python`Py_RunMain + 40
    frame #16: 0x0000000100005970 python`main + 56
    frame #17: 0x0000000189f210e0 dyld`start + 2360 

Steps to Reproduce

  1. Run script below of example code from docs

Code to Reproduce

import nimblephysics as nimble

rajagopal_opensim: nimble.biomechanics.OpenSimFile = nimble.RajagopalHumanBodyModel()
skeleton: nimble.dynamics.Skeleton = rajagopal_opensim.skeleton

positions = skeleton.getPositions()
positions[16] = 3.14 / 4
skeleton.setPositions(positions)

print(skeleton.getPositions())
print([skeleton.getDofByIndex(i).getName() for i in range(skeleton.getNumDofs())])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant