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

Author Topic: SIGSEGV Fault on exiting  (Read 3051 times)

0 Members and 1 Guest are viewing this topic.

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
SIGSEGV Fault on exiting
« on: December 22, 2012, 04:12:11 pm »
When I (deliberately) terminate my program, it exits with a SIGSEGV fault. This occurs only when I run the debug build though, the release build exits just fine. When I used the debugger, the fault occured on line 95 in Texture.cpp.

Texture::~Texture()
{
    // Destroy the OpenGL texture
    if (m_texture)
    {
        ensureGlContext();

        GLuint texture = static_cast<GLuint>(m_texture);
        glCheck(glDeleteTextures(1, &texture)); //line 95
    }
}

I only use ONE texture in my program and it is not dynamically allocated so I don't see what I'm doing wrong here...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SIGSEGV Fault on exiting
« Reply #1 on: December 22, 2012, 05:00:16 pm »
You're probably not doing anything wrong... SFML is known to have problems with the correct destruction of its global context/resources and I'm not sure what can be done.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: SIGSEGV Fault on exiting
« Reply #2 on: December 22, 2012, 05:13:28 pm »
Oh... Is that going to be fixed in SFML 2?
I'm using the release candidate atm.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SIGSEGV Fault on exiting
« Reply #3 on: December 22, 2012, 05:22:31 pm »
SFML will also have a global context etc, but the problem you ran into might already be fixed in the newest commit on GitHub. So you might want to build SFML on your own (or use my Nightly Builds posted on the forum).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SIGSEGV Fault on exiting
« Reply #4 on: December 22, 2012, 06:31:24 pm »
Quote
When I (deliberately) terminate my program
How? If it's by closing the console, then it's the expected behaviour. Otherwise you'll have to provide more information, because this is not supposed to happen.
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: SIGSEGV Fault on exiting
« Reply #5 on: December 22, 2012, 09:01:18 pm »
Simply by clicking the exit button.
window.close() is called and the program finishes.
Keep in mind I never dynamically allocated a single texture so all deleting is automatically...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SIGSEGV Fault on exiting
« Reply #6 on: December 22, 2012, 10:46:39 pm »
Can you show a complete and minimal code that reproduces the problem?
Laurent Gomila - SFML developer

 

anything