SIGSEGV in ntdll at app exit when using ChildWindow widget in 0.6.6

Started by kijanek6, 14 January 2015, 21:18:33


I'm getting segfault with following stack trace in GDB 7.6.1:

Compiler: TDM GCC 4.9.2
SFML: 2.2 self compiled, dynamic linking
TGUI: 0.6.6 self compiled, dynamic linking

I double checked that I link against proper compilation target (both libraries in debug and my project too). Both SFML and TGUI are built with dynamic standard library.

Example code (I borrowed it from some guy's recent post over here and replaced label with child window):

#include <SFML\Graphics.hpp>
#include <TGUI\TGUI.hpp>

int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "TestFenster");
tgui::Gui gui(window);


tgui::ChildWindow::Ptr guiConf(gui);

while (window.isOpen()) {
  sf::Event event;
  while (window.pollEvent(event)) {
   if (event.type == sf::Event::Closed){

  window.clear(sf::Color(120, 120, 120, 32));

It doesn't happen when I use other widgets. I've also noticed that gui.draw() is probably the problem, because the bug doesn't occur without that call.

Any ideas? :)


I want to believe you about you being sure that the libraries are set up correctly, but I am yet to see a crash on windows that was not caused by incompatible libraries.

Did you have any sfml or tgui version on your computer? If you do, remove them from your pc (or temporary rename the folder) to make sure they don't influence anything.
Since you are linking dynamically, make sure that you are using the right dlls. It wouldn't be the first time that someone used the right libraries but the wrong dlls.

If I would have the same compiler I would ask to send everything so I can test it on my pc but that won't be possible. But if you send me the .cbp file then I can double check if all settings are correct.

There is only one far-fetched reason that I can think of other than a wrong set-up. Did you build both the release and debug version of tgui? If you did, try clearing the cmake cache and just build the debug version. That would rule out the debug tgui libraries being linked to the sfml release libraries.