RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.37k stars 1.27k forks source link

segfault when loading a URDF from drake-designer application #33

Closed hongkai-dai closed 10 years ago

patmarion commented 10 years ago

It occurs when the application starts and loads a URDF using the c++ class URDFRigidBodyManipulator. The stack trace was odd looking, it said:

0 0x00000001073984ba in setJointLimits ()

1 0x000000010739ce46 in URDFRigidBodyManipulator::addURDF ()

2 0x000000011cfb4390 in ?? ()

Previous frame inner to this frame (gdb could not unwind past this frame)

The actual crash was likely a null ptr dereference: KERN_INVALID_ADDRESS at address: 0x0000000000000000

But that stack trace is very strange, looks like something funny is happening to confuse gdb. I compiled drake and my application in debug mode (CMAKE_BUILD_TYPE=Debug). Does that ensure the mex code is also compiled in debug mode?

patmarion commented 10 years ago

By the way, that's a stacktrace from OSX. I'll let you know what happens when I try on Linux.

hongkai-dai commented 10 years ago

Which URDF are you loading? I wrote the setJointLimits function in URDFRigidBodyManipulator

hongkai-dai commented 10 years ago

There are at least two problems:

hongkai-dai commented 10 years ago

These two problems are solved, I will send the pull request @RussTedrake , shall we add a test case for parsing model_LI_RI.urdf in drake? I did not catch these bugs before since I only tested it for atlas_minimal_contact.urdf, which does not have fixed joints, or link without inertia. Also, can we add the test files in pod-build/bin into unitTest? There are several IK tests in that folder.

RussTedrake commented 10 years ago

Yes to both. You should be able to use add_test in cmake to add your executable tests.

On Feb 17, 2014, at 3:01 PM, Hongkai Dai notifications@github.com wrote:

These two problems are solved, I will send the pull request @RussTedrake , shall we add a test case for parsing model_LI_RI.urdf in drake? I did not catch these bugs before since I only tested it for atlas_minimal_contact.urdf, which does not have fixed joints, or link without inertia. Also, can we add the test files in pod-build/bin into unitTest? There are several IK tests in that folder.

— Reply to this email directly or view it on GitHub.

patmarion commented 10 years ago

I can confirm that the issue is resolved on URDFRigidBodyManipulatorBug branch. Ran it on my macbook in the drake-designer application.

https://github.com/hongkai-dai/drake/tree/URDFRigidBodyManipulatorBug

RussTedrake commented 10 years ago

I believe Hongkai closed his pull request. Now that I've hopefully fixed the building on Ubuntu, I presume he will give me a new pull request to commit this?

On Feb 18, 2014, at 9:02 AM, Pat Marion notifications@github.com wrote:

I can confirm that the issue is resolved on URDFRigidBodyManipulatorBug branch. Ran it on my macbook in the drake-designer application.

https://github.com/hongkai-dai/drake/tree/URDFRigidBodyManipulatorBug

— Reply to this email directly or view it on GitHub.

hongkai-dai commented 10 years ago

I just sent a new pull request #36 . Sorry for sending it late.

Hongkai