Why is joining two vectors simply not working? <p>I have two vectors of MyObj structs. MyObj is defined as follows:</p> <pre><code>struct MyObj { float x, y; unsigned int data[8]; unsigned int tmp[1]; MyObj(const MyObj &amp;m) { x = m.x; y = m.y; tmp[0] = 0; for (int i = 0; i &lt; 8; ++i) { data[i] = m.data[i]; } } }; </code></pre> <p>I then have two vectors...</p> <pre><code>vector&lt;MyObj&gt; v1; vector&lt;MyObj&gt; v2; // both get data eventually. v1.insert(v1.end(), v2.begin(), v2.end()); </code></pre> <p>v2 has 3535004 elements in my experiment. v1 is similarly sized. I've also tried building a new vector and just using .push_back to build it from both vectors.</p> <p>Essentially, when I try to merge the two vectors I just get an error from visual studio saying "Debug error! R6010, abort() has been called". Very non-useful... </p> <p>So my question is: what could be causing this error, and how can I solve it? Thank you</p>