Your sample code isn't self-contained so I can only glance over it.
For now:
for(int i = 0; i < h.total_num_of_voxels_; ++i)
ar & h.voxels_[i];
ar & h.num_of_voxels_;
ar & h.total_num_of_voxels_i_;
How would you think this could work? Clearly, h.total_num_of_voxels
is either zero or indeterminate at the time of the loop when deserializing. Assuming it is an array (or at least contiguously stored elements in memory), use the array adaptor:
ar & boost::serialization::make_array(h.voxels_, h.total_num_of_voxels_);
ar & h.num_of_voxels_;
Here's a reverse engineered example making some guesses based on your original code: Live On Coliru
Output
g++ -std=c++11 -Os -pedantic main.cpp -lboost_system -lboost_serialization && ./a.out && tail *.hash
archive filenameonetwo42_4242_999.hash
22 serialization::archive 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0