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

Author Topic: [C++] Program crashes after calling window.display() (Linux)  (Read 1872 times)

0 Members and 1 Guest are viewing this topic.

Symphonym

  • Newbie
  • *
  • Posts: 32
    • View Profile
[C++] Program crashes after calling window.display() (Linux)
« on: March 30, 2013, 06:48:18 pm »
So I'm currently working on a school game project using SFML, and occasionally it randomly crashes. I've finally managed to catch this happening when running the program in GDB, so here's the backtrace:

#0  0x0000000100000000 in ?? ()
#1  0x00007ffff2e1983b in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#2  0x00007ffff2e81f21 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#3  0x00007ffff2e82cdc in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#4  0x00007ffff2ec67c8 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#5  0x00007ffff2ecb967 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#6  0x00007ffff2ea282c in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#7  0x00007ffff2eb0397 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#8  0x00007ffff2eb04e7 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#9  0x00007ffff586f9fd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007ffff58461c7 in glXSwapBuffers () from /usr/lib/nvidia-current/libGL.so.1
#11 0x00007ffff7749784 in sf::priv::GlxContext::display (this=0x80d020)
    at /home/jakob/Skrivbord/LaurentGomila-SFML-9fac5d7/src/SFML/Window/Linux/GlxContext.cpp:146
#12 0x00007ffff7746a9c in sf::Window::display (this=0x7fffffffe230)
    at /home/jakob/Skrivbord/LaurentGomila-SFML-9fac5d7/src/SFML/Window/Window.cpp:331
#13 0x0000000000409f3d in jl::Engine::gameloop (this=0x7fffffffe210) at Engine.cpp:106
#14 0x000000000041b49e in jl::Engine::run<GameState> (this=0x7fffffffe210) at Engine.h:80
#15 0x000000000041ae0b in main (argc=1, args=0x7fffffffe588) at main.cpp:24
 

My code points down to the window.display() function in my gameloop, and the SFML code points down to the "glXSwapBuffers(m_display, m_window);" call in Linux/GlxContext (as you can see above). My initial thought was that I maybe have a memory leak somewhere, the fault is then mine, otherwise I have no idea what causes this.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [C++] Program crashes after calling window.display() (Linux)
« Reply #1 on: March 30, 2013, 07:57:33 pm »
So what would be a minimal example that reproduces the problem?

Seeing that it originates from the NVidia driver, I'd guess it's a driver issue...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Symphonym

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [C++] Program crashes after calling window.display() (Linux)
« Reply #2 on: March 30, 2013, 08:25:12 pm »
So what would be a minimal example that reproduces the problem?

Seeing that it originates from the NVidia driver, I'd guess it's a driver issue...

Changed my driver to the "experimental" Nvidia 310 driver, and it haven't crashed a single time yet. So hopefully it was just a driver issue, and not a deeply hidden leak in my code >.<

 

anything