I havent tested anything, but I suspect it is the source2 vertex loop.
Such a simple fault, maybe even a typo...
Find the lines :
new_norm.x = vbuffer_source2[iterate+offsetv].nx;
new_norm.y = vbuffer_source2[iterate+offsetv].ny;
new_norm.z = vbuffer_source2[iterate+offsetv].nz;
and replace them with ::
new_norm.x = vbuffer_source2[iterate].nx;
new_norm.y = vbuffer_source2[iterate].ny;
new_norm.z = vbuffer_source2[iterate].nz;
And that will fix the crashes at least...