Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reason behind this bug is related to a bug reported in roscomm: https://github.com/ros/ros_comm/issues/688

To fix this, I changed the int main function to:

int main(int argc, char** argv)
{
  ros::init(argc, argv, "TransitionClientTest");
  testing::InitGoogleTest(&argc, argv);
  ros::NodeHandle nh("~");
  int result = RUN_ALL_TESTS();
  return result;
}

When there was a NodeHandle that persisted, it prevented the std::bad_alloc exception and gave me console output in the proceeding cases.