Ok, I finally figured this out. That was due to the crappy implementation of the PIMPL pattern - it was using uninitialized pointer.