after facing an issue with the driver crashing during an iterative read/write process, I wanted to try the upgrade from 3.5.0 to 3.6.0. Compilation was no big deal after figuring out howto do it at the last time. I’m still using Boost (1.72.0) for the Polyfill even if I use VS2017 for my application.
After switching to 3.6.0 I was not able to connect to the DB nor even create an mongocxx::uri by passing a const std::string. Also taking the detour by creating a bsoncxx::string::view_or_value first does not help. After passing the c-String from my string object, the uri constructor was not throwing any longer but then creating a mongocxx::pool was causing the trouble. From then, the passed string was no longer a undefined object. There I stopped further investigations and went back to 3.5.0.
I’m actually also struggeling by catching exceptions, but I’m sure this is another topic. I’m also pretty sure, that the crashing behaviour is linked to some weird unmatching VS compiling setting or sth.
Just stumbled over this again.
For those who wondering. It was a simple VisualStudio Project config issue. The debug version of my application was not compiled with the /MDd flag.