Isn't there a problem with allocating memory in a separate dll that is used in the main exe or another dll? I seem to remember reading about problems people have had trying to use stl containers in a dll because of the way the memory is allocated. That may be what is happening here.