Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Error when closing application?  (Read 2542 times)

0 Members and 1 Guest are viewing this topic.

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Error when closing application?
« on: March 23, 2011, 10:38:13 am »
Heres my call stack. Is this a bug or did I do something stupid?

Code: [Select]
> msvcp100d.dll!std::num_put<char,std::ostreambuf_iterator<char,std::char_traits<char> > >::put(std::ostreambuf_iterator<char,std::char_traits<char> > _Dest, std::ios_base & _Iosbase, char _Fill, unsigned long _Val)  Line 1105 + 0x21 bytes C++
  msvcp100d.dll!std::basic_ostream<char,std::char_traits<char> >::operator<<(unsigned int _Val)  Line 316 + 0x73 bytes C++
  AdventureGun.exe!sf::priv::GLCheckError(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & file, unsigned int line)  Line 104 + 0x9d bytes C++
  AdventureGun.exe!sf::Image::~Image()  Line 88 + 0x31 bytes C++
  AdventureGun.exe!sf::Font::Page::~Page()  + 0x4e bytes C++
  AdventureGun.exe!std::_Pair_base<unsigned int const ,sf::Font::Page>::~_Pair_base<unsigned int const ,sf::Font::Page>()  + 0x19 bytes C++
  AdventureGun.exe!std::pair<unsigned int const ,sf::Font::Page>::~pair<unsigned int const ,sf::Font::Page>()  + 0x16 bytes C++
  AdventureGun.exe!std::pair<unsigned int const ,sf::Font::Page>::`scalar deleting destructor'()  + 0x16 bytes C++
  AdventureGun.exe!std::_Destroy<std::pair<unsigned int const ,sf::Font::Page> >(std::pair<unsigned int const ,sf::Font::Page> * _Ptr)  Line 64 C++
  AdventureGun.exe!std::allocator<std::pair<unsigned int const ,sf::Font::Page> >::destroy(std::pair<unsigned int const ,sf::Font::Page> * _Ptr)  Line 213 + 0x9 bytes C++
  AdventureGun.exe!std::_Dest_val<std::allocator<std::pair<unsigned int const ,sf::Font::Page> >,std::pair<unsigned int const ,sf::Font::Page> >(std::allocator<std::pair<unsigned int const ,sf::Font::Page> > & _Alval, std::pair<unsigned int const ,sf::Font::Page> * _Pdest)  Line 288 C++
  AdventureGun.exe!std::_Tree<std::_Tmap_traits<unsigned int,sf::Font::Page,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,sf::Font::Page> >,0> >::_Erase(std::_Tree_nod<std::_Tmap_traits<unsigned int,sf::Font::Page,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,sf::Font::Page> >,0> >::_Node * _Rootnode)  Line 1617 + 0x22 bytes C++
  AdventureGun.exe!std::_Tree<std::_Tmap_traits<unsigned int,sf::Font::Page,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,sf::Font::Page> >,0> >::clear()  Line 1416 C++
  AdventureGun.exe!sf::Font::Cleanup()  Line 298 C++
  AdventureGun.exe!sf::Font::~Font()  Line 70 C++
  AdventureGun.exe!`sf::Font::GetDefaultFont'::`2'::`dynamic atexit destructor for 'font''()  + 0xd bytes C++
  msvcr100d.dll!doexit(int code, int quick, int retcaller)  Line 567 C
  msvcr100d.dll!_cexit()  Line 408 + 0xb bytes C
  msvcr100d.dll!__CRTDLL_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 313 C
  msvcr100d.dll!_CRTDLL_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 217 + 0x11 bytes C
  ntdll.dll!7c90118a()
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
  ntdll.dll!7c9224ca()
  ntdll.dll!7c910435()
  ntdll.dll!7c91043e()
  ntdll.dll!7c922678()
  kernel32.dll!7c8763bb()
  kernel32.dll!7c87655c()
  kernel32.dll!7c80b729()
  kernel32.dll!7c8763c0()

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error when closing application?
« Reply #1 on: March 23, 2011, 10:42:08 am »
OS? SFML version? Compiler? Code?
Laurent Gomila - SFML developer

vidjogamer

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Error when closing application?
« Reply #2 on: March 23, 2011, 10:51:45 am »
Windows XP
Visual C++ 2010
SFML 2.0

I dont really know what code to give you.   :cry:
The call stack doesnt point to my code at all.

It happens when I close the app. When I get rid of this:
Code: [Select]

stringstream ss; ss << "FPS: " << FRAMERATE; //FPS being your framerate int/float/whatever
sf::Text txtFPS(ss.str());
txtFPS.SetPosition(0, 0);

View view;
window->SetView(view);
window->Draw(txtFPS);


it doesnt crash in debug mode anymore. But it still crashes in release.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error when closing application?
« Reply #3 on: March 23, 2011, 10:55:05 am »
Thanks. It's ok for the code, that's all I needed ;)
Laurent Gomila - SFML developer