-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix segment fault on 32-bit machine #459
Conversation
Codecov Report
@@ Coverage Diff @@
## master #459 +/- ##
==========================================
- Coverage 78.89% 78.88% -0.02%
==========================================
Files 258 258
Lines 6303 6300 -3
==========================================
- Hits 4973 4970 -3
Misses 1330 1330
|
CHANGELOG.md
Outdated
@@ -49,6 +49,7 @@ | |||
* Changed interface for TrajectoryPostProcessor: [#341](https://github.com/personalrobotics/aikido/pull/341) | |||
* Planning calls with InverseKinematicsSampleable constraints explicitly set MetaSkeleton to solve IK with: [#379](https://github.com/personalrobotics/aikido/pull/379) | |||
* Added a kinodynamic timer that generates a time-optimal smooth trajectory without completely stopping at each waypoint: [#443](https://github.com/personalrobotics/aikido/pull/443) | |||
* Fix segment fault on 32 bit machine in vector-field planner: [#459](https://github.com/personalrobotics/aikido/pull/459) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Fixed
//============================================================================== | ||
VectorFieldIntegrator::~VectorFieldIntegrator() | ||
{ | ||
mVectorField->getStateSpace()->freeState(mState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using ScopedState
instead of we take the responsibility of the memory allocation/deallocation.
I have tested this branch on a 32bit machine. All the previous tests are passed. The error received in running
The error received in running
@aditya-vk do you have any idea? |
@dqyi11 Thanks for the fix! However, I'm questionable if we really want to support 32 bit platforms. Do we have any use case? If we decide to do so, I think we should have a CI setup so that we can continuously have surveillance on the failings. Otherwise, let's not bother 32-bit issues. @brianhou @gilwoolee @aditya-vk thoughts? :) |
I don't particularly care about 32-bit platforms, but it seems like it might reveal otherwise hidden bugs (e.g. this mixup between |
I think the failures in 32-bit machine are caused by multiple reasons. Most of them are related with memory operation. Fixing them could also improve the robustness of aikido on 64-bit machine. Maybe we can close this one. Because all the problems we found previously are addressed. |
* fix memory leak * increase timelimit for success rate * update CHANGELOG * change to use scopedState * Update CHANGELOG.md * Minor wording fix.
This PR fixes the last issue left in #365
I have tested it on 32-bit machine.
The previous code uses
createState()
of a state space to aState
raw point, which causes problem in ownership and thus memory leak.The timilimit in the unit test is increased for successul rate.
Before creating a pull request
make format
Before merging a pull request
CHANGELOG.md