opened
zmichaels11
username_0
### Changes
* Require `compression_mode_` to not be none within `load_next_file`
* Require `decompressor_` to not be null if `compression_mode_` is `FILE` in `load_next_file`
Fix throw in playback of split+compressed bagfiles
issue
created
zmichaels11
username_0
@ros2/aws-oncall - please run this CI job
Gist: https://gist.githubusercontent.com/username_0/50bcd011e1f31e0477fe5c58c6f99c1a/raw/2d07178c55d483933adb583f2f4184765f0a4128/ros2.repos
BUILD args: --packages-up-to rosbag2_compression
TEST args: --packages-select rosbag2_compression
Job: ci_launcher
comment
created
emersonknapp
username_1
Is this a bugfix? If so, can we put in a regression test for it?
comment
created
dabonnie
username_2
* Linux [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_linux&build=9347)](http://ci.ros2.org/job/ci_linux/9347/)
* Linux-aarch64 [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_linux-aarch64&build=5029)](http://ci.ros2.org/job/ci_linux-aarch64/5029/)
* macOS [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_osx&build=7653)](http://ci.ros2.org/job/ci_osx/7653/)
* Windows [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_windows&build=9269)](http://ci.ros2.org/job/ci_windows/9269/)
* Windows-container [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_windows-container&build=135)]
comment
created
zmichaels11
username_0
A proper unit test for this regression will require a `CompressionFactory` so we can mock out `ZstdDecompressor`. I'll try and find some time to introduce that in a separate project.
comment
created
piraka9011
username_3
Open a ticket to track this please.
comment
created
zmichaels11
username_0
@username_3 Opened https://github.com/ros2/rosbag2/issues/297
comment
created
Karsten1987
username_4
@username_0 what's the status of this PR?
comment
created
zmichaels11
username_0
We want to put sufficient testing on the changes in this PR before merging it in.
@username_3 is going to merge in the work required to write the unit tests shortly.
comment
created
piraka9011
username_3
The main fix comes from this: 

```c++
if (decompressor_ == nullptr) {
  throw std::runtime_error{
    "The bag file was not properly opened. "
    "Somehow the compression mode was set without opening a decompressor."
  };
}
```

Where the previous check was simply:

```c++
if (decompressor_) {
...
}
```
comment
created
piraka9011
username_3
* Linux [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_linux&build=9613)](http://ci.ros2.org/job/ci_linux/9613/)
* Linux-aarch64 [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_linux-aarch64&build=5309)](http://ci.ros2.org/job/ci_linux-aarch64/5309/)
* macOS [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_osx&build=7836)](http://ci.ros2.org/job/ci_osx/7836/)
* Windows [![Build Status](http://ci.ros2.org/buildStatus/icon?job=ci_windows&build=9518)](http://ci.ros2.org/job/ci_windows/9518/)
comment