Hmm so I realised, in Debug mode, I was using my old DLLs. Put the new ones in, and I get the same heap error, but now I have traced it to a single line of code.
sf::Font myFont;
if (myFont.LoadFromFile("arial.ttf"))
{
sf::Text startText("hello world",myFont,150); // DIES IN HERE!
}
It actually crashes in "new.cpp" line 59:
void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc)
{ // try to allocate size bytes
void *p;
while ((p = malloc(size)) == 0) // DIES HERE!
if (_callnewh(size) == 0)
{ // report no memory
static const std::bad_alloc nomem;
_RAISE(nomem);
}
return (p);
}
Call stack trace:
ntdll.dll!77c10844()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77bd2a74()
ntdll.dll!77b8cd87()
> sfml-system-d-2.dll!operator new(unsigned int size=11075584) Line 59 + 0x9 bytes C++
KernelBase.dll!7700468e()
sfml-graphics-d-2.dll!_CrtIsValidHeapPointer(const void * pUserData=0x00b16ec8) Line 2072 C++
sfml-graphics-d-2.dll!_free_dbg_nolock(void * pUserData=0x00b16ec8, int nBlockUse=1) Line 1279 + 0x9 bytes C++
sfml-graphics-d-2.dll!_free_dbg(void * pUserData=0x00b16ec8, int nBlockUse=1) Line 1220 + 0xd bytes C++
sfml-graphics-d-2.dll!operator delete(void * pUserData=0x00b16ec8) Line 54 + 0x10 bytes C++
sfml-graphics-d-2.dll!std::allocator<unsigned int>::deallocate(unsigned int * _Ptr=0x00b16ec8, unsigned int __formal=12) Line 141 + 0x9 bytes C++
sfml-graphics-d-2.dll!std::basic_string<unsigned int,std::char_traits<unsigned int>,std::allocator<unsigned int> >::_Tidy(bool _Built=true, unsigned int _Newsize=0) Line 2076 C++
sfml-graphics-d-2.dll!std::basic_string<unsigned int,std::char_traits<unsigned int>,std::allocator<unsigned int> >::~basic_string<unsigned int,std::char_traits<unsigned int>,std::allocator<unsigned int> >() Line 906 C++
sfml-graphics-d-2.dll!sf::String::~String() + 0x16 bytes C++
Now I am really confused