Thanks for your response! I’m a colleague of @KKulikovskis and maybe I can provide some more details.
We have not installed any TL specifically, just CVB from the installer.
Although I noticed that the cameras show up in CVB GeniCam Browser
This is the small example code where the problem presents itself:
#include <librealsense2/rs.hpp>
#include <iostream>
#include <cvb/device_factory.hpp>
int main(int argc, char *argv[]) {
rs2::context ctx;
auto list = ctx.query_devices(); // Get a snapshot of currently connected devices
if (list.size() == 0)
throw std::runtime_error("No device detected. Is it plugged in?");
rs2::device dev = list.front();
rs2::pipeline pipe;
pipe.start();
std::cout << "started" << std::endl;
return 0;
}
The application crashes at pipe.start() with free(): invalid pointer.
But if the CVB include #include <cvb/device_factory.hpp> is removed then everything is ok.
Just a little extra information: If you have the GEV Variant (i.e. not USB of Realsense) then my Transportlayer won’t help you and you don’t need it.
But i got good news for you, if you do the acquisition via librealsense, then you don’t need device_factory.hpp. (I was not aware that librealsense handles GEV devices).
As for the error itself, no idea, i can be a dependency (like libjpeg as an example, which librealsense needs in a different version). But more like is, that there is a define overridden. Check the compiler warnings. BUT this is just a silly coincidence then.
To clrafiy - we are not using cvb/device_factory.hpp with regards to our Realsense cameras in any way.
We have a teledyne camera that we use in the same application, that is used through CVB. @OskarsO Example was to illustrate that we have pinned down the problem to these 2 includes conflicting in some way.
CVB is being used exclusively with Teledyne camera in our application, but this error still happens.
And All of our cameras (Realsense and Teledyne) use LAN connection - there are no USB devices.