Skip to content

Instantly share code, notes, and snippets.

/Build command Secret

Created December 22, 2013 02:26
Show Gist options
  • Save anonymous/6a101d6c6e01fc0e3df6 to your computer and use it in GitHub Desktop.
Save anonymous/6a101d6c6e01fc0e3df6 to your computer and use it in GitHub Desktop.
mingw32-g++ sfgui_sfml_crash.cpp -o sfgui_sfml_crash.exe -std=c++11 -Wall -fexceptions -DSFML_STATIC -DSFGUI_STATIC -g -IC:\Libraries\SFML\include -IC:\Libraries\SFGUI\include -LC:\Libraries\SFML\lib -LC:\Libraries\SFGUI\lib -lsfgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lsfml-main
C:\Projects\Shorts>gdb sfgui_sfml_crash.exe
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Projects\Shorts\sfgui_sfml_crash.exe...done.
(gdb) run
Starting program: C:\Projects\Shorts/sfgui_sfml_crash.exe
[New Thread 7804.0x1d80]
[New Thread 7804.0x1e84]
[New Thread 7804.0x1d48]
Program received signal SIGSEGV, Segmentation fault.
0x005287ed in sf::String::String(sf::String const&) ()
(gdb) backtrace
#0 0x005287ed in sf::String::String(sf::String const&) ()
#1 0x00473f99 in sf::Text::Text(sf::String const&, sf::Font const&, unsigned int) ()
#2 0x0042c541 in sfg::eng::BREW::CreateComboBoxDrawable(std::shared_ptr<sfg::ComboBox const>) const ()
#3 0x00404fbb in sfg::ComboBox::InvalidateImpl() const ()
#4 0x00414e2b in sfg::Widget::Update(float) ()
#5 0x00407e05 in sfg::Container::HandleUpdate(float) ()
#6 0x00414feb in sfg::Widget::Update(float) ()
#7 0x00407e05 in sfg::Container::HandleUpdate(float) ()
#8 0x00414feb in sfg::Widget::Update(float) ()
#9 0x00408115 in sfg::Desktop::Update(float) ()
#10 0x004019f3 in main () at sfgui_sfml_crash.cpp:27
(gdb)
#include <SFML/Graphics.hpp>
#include <SFGUI/SFGUI.hpp>
int main(){
sfg::SFGUI sfguiHandle;
sfg::Desktop Desktop;
sf::RenderWindow Window(sf::VideoMode(800,600,32), "SFGUI SFML Crash");
sf::Clock InternalClock;
auto testWindow = sfg::Window::Create();
auto layout = sfg::Box::Create();
auto combo = sfg::ComboBox::Create();
layout->Pack(combo);
testWindow->Add(layout);
Desktop.Add(testWindow);
while(Window.isOpen()){
sf::Event e;
while(Window.pollEvent(e)){
Desktop.HandleEvent(e);
if(e.type == sf::Event::Closed){
Window.close();
}
}
Desktop.Update(InternalClock.restart().asSeconds());
Window.clear();
Window.resetGLStates();
sfguiHandle.Display(Window);
Window.display();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment