Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kijanek6

#1
Hello,
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);

gui.setGlobalFont("consola.ttf");

tgui::ChildWindow::Ptr guiConf(gui);
guiConf->load("Black.conf");
guiConf->setSize(250,250);
guiConf->setPosition(50,50);
guiConf->setTitle("aaa");

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

  window.clear(sf::Color(120, 120, 120, 32));
  gui.draw();
  window.display();
}
}


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? :)