Probably it tries executing some unloaded or uninitialised code. If you are not interested in _penter that are invoked during finalisation, you can apply this workaround:
int main( )
{
. . .
__declspec( dllimport ) bool exiting;
exiting = true;
return 0;
}
In Interceptor.h:
__declspec( dllexport ) bool exiting = false;
extern"C" void on_enter( const void* pa )
{
if( exiting ) return;
. . .
}