title: Constructor reference parameter results in seg fault
body: <p>I am using the following code in a ROS application.</p>
  
  <pre><code>class RobotisController
  {
  private:
      ....
  public:
      ros::NodeHandle pxxx;
  }
  
  RobotisController::RobotisController(ros::NodeHandle&amp; nh) : pxxx(nh)
  {
      packetHandlerList.push_back(PacketHandler::getPacketHandler(1.0));
      packetHandlerList.push_back(PacketHandler::getPacketHandler(2.0));
  }
  
  
  class RosWrapper {
  protected:
      Robotis::RobotisController controller_;
      ros::NodeHandle nh_;
      ....
  
  public:
      RosWrapper() :
              controller_(nh_) {}
  }
  
  
  main()  
  {
      RosWrapper interface;
  }
  </code></pre>
  
  <p>When I run the above code it leads to a SIGSEGV. I tried to debug the code and when I reach the constructor of the RobotisController, I find that the variable passed to the constructor <code>nh</code> shows <code>cannot access memory</code>, but the memory is already allocated in the class RosWrapper. </p>