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

Fix segfault from tracked_users_ initialization #42

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

mintar
Copy link
Contributor

@mintar mintar commented Jun 1, 2016

tracked_users_ has to be initialized before registering the
imageCallback, otherwise it can be NULL inside the callback,
leading to the following segfault:

#0  0x00007fffec52419a in std::list<nite::UserData, std::allocator<nite::UserData> >::empty (this=0x0) at /usr/include/c++/4.8/bits/stl_list.h:869
#1  0x00007fffec515161 in BodyTracker::imageCallback (this=0x95c090, color_image_msg=...)
    at /home/martin/ros-indigo-ws/src/cob_people_perception/cob_openni2_tracker/ros/src/body_tracker.cpp:196

tracked_users_ has to be initialized before registering the
imageCallback, otherwise it can be NULL inside the callback,
leading to the following segfault:

    #0  0x00007fffec52419a in std::list<nite::UserData, std::allocator<nite::UserData> >::empty (this=0x0) at /usr/include/c++/4.8/bits/stl_list.h:869
    ipa320#1  0x00007fffec515161 in BodyTracker::imageCallback (this=0x95c090, color_image_msg=...)
        at /home/martin/ros-indigo-ws/src/cob_people_perception/cob_openni2_tracker/ros/src/body_tracker.cpp:196
@ipa-rmb
Copy link
Contributor

ipa-rmb commented Jun 15, 2016

Thanks for finding and fixing this bug! Great contribution.

@ipa-rmb ipa-rmb merged commit 18b5193 into ipa320:indigo_dev Jun 15, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants