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

Map mutexes do nothing #11

Closed
skohlbr opened this issue Sep 13, 2013 · 1 comment
Closed

Map mutexes do nothing #11

skohlbr opened this issue Sep 13, 2013 · 1 comment

Comments

@skohlbr
Copy link
Contributor

skohlbr commented Sep 13, 2013

The mutexes used to lock the map structure do nothing, as only temporaries are created that go out of scope immediately after creation. Instead of

boost::mutex::scoped_lock(map_mutex_);

this should be used:

boost::mutex::scoped_lock lock (map_mutex_);

I only noticed this bug when carelessly copying some code from slam_gmapping and then getting crashes. Apparently, the mutexes aren´t that crucial in slam_gmapping though, as this bug has been there from the beginning years ago :)

@wjwwood
Copy link
Member

wjwwood commented Sep 13, 2013

⁉️ Oh man, this is silly... I'll make a pull request...

skohlbr added a commit to skohlbr/slam_gmapping that referenced this issue Jan 12, 2014
wjwwood added a commit that referenced this issue Jan 12, 2014
Fix map mutex use (gmapping issue #11)
wjwwood pushed a commit that referenced this issue Jan 12, 2014
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

2 participants