Hi
Just starting to use the font stuff, and with this code running under a Debug version in VC2005
sf::Font myFont;
if (myFont.LoadFromFile("arial.ttf"))
{
sf::Text startText("HELLO",myFont,50);
startText.SetColor(sf::Color(255,255,255));
window1.Draw(startText);
}
I get "Windows has triggered a breakpoint in myapp.exe. This may be due to a corruption of the heap, or any of the DLLs it has loaded".
It breaks in "new.cpp", at the line "while ((p = malloc(size)) == 0)"
void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc)
{ // try to allocate size bytes
void *p;
while ((p = malloc(size)) == 0)
if (_callnewh(size) == 0)
{ // report no memory
static const std::bad_alloc nomem;
_RAISE(nomem);
}
return (p);
}
Call stack:
ntdll.dll!77ac0844()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77a82a74()
ntdll.dll!77a3cd87()
sfml-system-d-2.dll!operator new(unsigned int size=41156608) Line 59 + 0x9 bytes C++
KernelBase.dll!751b468e()
sfml-graphics-d-2.dll!_CrtIsValidHeapPointer(const void * pUserData=0x00767790) Line 2072 C++
sfml-graphics-d-2.dll!_free_dbg_nolock(void * pUserData=0x00767790, int nBlockUse=1) Line 1279 + 0x9 bytes C++
sfml-graphics-d-2.dll!_free_dbg(void * pUserData=0x00767790, int nBlockUse=1) Line 1220 + 0xd bytes C++
sfml-graphics-d-2.dll!operator delete(void * pUserData=0x00767790) Line 54 + 0x10 bytes C++
sfml-graphics-d-2.dll!std::allocator<unsigned int>::deallocate(unsigned int * _Ptr=0x00767790, 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++
myapp.exe!GfxEngine::init() Line 140 + 0x7d bytes C++
Ideas?[/code]