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

Author Topic: Exception thrown within sfml-window.dll when exiting  (Read 2013 times)

0 Members and 1 Guest are viewing this topic.

stubler

  • Newbie
  • *
  • Posts: 17
    • View Profile
Exception thrown within sfml-window.dll when exiting
« on: March 01, 2010, 10:17:55 pm »
I intend to use SFML within a .dll accessed by a C# GUI. For testing, I copied the main body of OpenGL.cpp sample into a function within my .dll project. Everything worked fine, however while exiting the program I experience an exception.  I am using Visual Studio 2005 on an XP machine.

The call stack looks like this:
    nvoglnt.dll!697216d0()    
    [Frames below may be incorrect and/or missing, no symbols loaded for nvoglnt.dll]   
    nvoglnt.dll!69721a5b()    
    nvoglnt.dll!6973ce0a()    
    nvoglnt.dll!69594d4e()    
    nvoglnt.dll!69585c0d()    
    nvoglnt.dll!6971f4a8()    
    opengl32.dll!5ed19652()    
    opengl32.dll!5ed19aad()    
    opengl32.dll!5ed19c5f()    
>   sfml-window-d.dll!sf::priv::WindowImplWin32::SetActive(bool Active=true)  Line 298 + 0x1c bytes   C++
    sfml-window-d.dll!sf::Context::SetActive(bool Active=true)  Line 64 + 0x17 bytes   C++
    sfml-graphics-d.dll!sf::priv::GraphicsContext::GraphicsContext()  Line 69   C++
    sfml-graphics-d.dll!sf::Image::DestroyTexture()  Line 776 + 0x8 bytes   C++
    sfml-graphics-d.dll!sf::Image::~Image()  Line 117   C++
    sfml-graphics-d.dll!sf::Font::~Font()  + 0x63 bytes   C++
    sfml-graphics-d.dll!`sf::Font::GetDefaultFont'::`2'::`dynamic atexit destructor for 'DefaultFont''()  + 0x28 bytes   C++
    sfml-graphics-d.dll!_CRT_INIT(void * hDllHandle=0x04230000, unsigned long dwReason=0, void * lpreserved=0x00000001)  Line 420   C
    sfml-graphics-d.dll!__DllMainCRTStartup(void * hDllHandle=0x04230000, unsigned long dwReason=0, void * lpreserved=0x00000001)  Line 512 + 0x11 bytes   C
    sfml-graphics-d.dll!_DllMainCRTStartup(void * hDllHandle=0x04230000, unsigned long dwReason=0, void * lpreserved=0x00000001)  Line 462 + 0x11 bytes   C

When I comment out the four lines near the bottom dealing with rendering the string "This is a rotating cube", I do not experience the exception.

Any suggestions?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Exception thrown within sfml-window.dll when exiting
« Reply #1 on: March 01, 2010, 11:29:32 pm »
This is a known bug. An easy workaround is to use the static SFML libraries.
Laurent Gomila - SFML developer

 

anything