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

Cannot move rosbag::Bag #2333

Open
Bob-1 opened this issue Jun 8, 2023 · 0 comments
Open

Cannot move rosbag::Bag #2333

Bob-1 opened this issue Jun 8, 2023 · 0 comments

Comments

@Bob-1
Copy link

Bob-1 commented Jun 8, 2023

rosbag::Bag has a move constructor, which fails for below example:

std::vector<rosbag::Bag> bags;
bags.push_back(rosbag::Bag());

It is the file_ swap that fails, because file_.read_stream_ and file_.write_stream_ are null pointers.

Checks could be added there to make sure these pointers are valid, but that's probably not the right solution. Furthermore, when solving it that way below warning is shown at termination:

Warning: class_loader.ClassLoader: SEVERE WARNING!!!
Attempting to unload /opt/ros/noetic/lib//librosbag_default_encryption_plugins.so
while objects created by this library still exist in the heap!
You should delete your objects before destroying the ClassLoader. The library will NOT be unloaded.
         at line 119 in /tmp/binarydeb/ros-noetic-class-loader-0.5.0/src/class_loader.cpp

When searching for this the only thing I could find is this open question.

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