title: Boost serialization text_iarchive process died
body: <p>I'm using boost::archive for the serialization of my objects. I have my code here:  </p>
  
  <pre><code>void Tracking::SaveMap() {
      ofstream ofs("/home/yisha/Workspace/Map/map.txt");
      boost::archive::text_oarchive oa(ofs);
      oa &lt;&lt; *mpMap;
  }
  
  bool Tracking::LoadMap() {
      cout &lt;&lt; "\nLoading map..." &lt;&lt; endl;
  
      Map* tmpMap; 
      ifstream ifs("/home/yisha/Workspace/Map/map.txt");
      if(!ifs.good()) {
          printf("ifs not good\n");
          return false;
      }
  
      printf("after ifstream\n");
      boost::archive::text_iarchive ia(ifs);
      printf("after archive\n");
      ia &gt;&gt; *tmpMap;
      printf("after ia\n");
  
      mpMap = tmpMap;
  
      cout &lt;&lt; "Loading map finished!" &lt;&lt; endl;
  
      return true;
  }
  </code></pre>
  
  <p>The <code>mpMap</code> is an object with serialize function implemented.<br>
  The map is saved successfully but I cannot verify whether the <code>map.txt</code> is correct since I cannot load the map back.<br>
  I'm running inside ros and the runtime error is just process died. I've got the output here:  </p>
  
  <blockquote>
    <p>Loading map...<br>
    after ifstream<br>
    after archive<br>
    [mono-1] process has died [pid 19721, exit code -11, cmd /home/yisha/Workspace/VO/ORB_SLAM2/Examples/ROS/ORB_SLAM2/Mono __name:=mono __log:=/home/yisha/.ros/log/811c9cf6-68a6-11e6-9123-408d5cb4a2ef/mono-1.log].<br>
    log file: /home/yisha/.ros/log/811c9cf6-68a6-11e6-9123-408d5cb4a2ef/mono-1*.log<br>
    all processes on machine have died, roslaunch will exit  </p>
  </blockquote>
  
  <p>There's no log file in the directory it says.</p>