i create this stuff:
sfg::SFGUI sfgui;
button = sfg::Button::Create( "Hello" );
button->GetSignal( sfg::Button::OnLeftClick ).Connect( &OnButtonClick );
sfg::Window::Ptr Deskwin = sfg::Window::Create();
Deskwin->SetTitle( "Hello World example" );
Deskwin->Add( button );
sfg::Desktop desktopx;
desktopx.Add( Deskwin );
And when i make a thread.start();
which does a few web requests like
sf::Http http;
http.setHost("http://riedbook.de/");
sf::Http::Request request;
request.setMethod(sf::Http::Request::Get);
request.setUri("images/"+Main);
request.setHttpVersion(1, 1); // HTTP 1.1
sf::Http::Response response = http.sendRequest(request);
std::string body = response.getBody();
MainTexture.loadFromMemory(body.data(),body.size());
MainSprite.setTexture(MainTexture);
mode = 1;
i throws a exception. If i do not define the first stuff everything is fine and if i do not start the thread everything is fine aswell, but if i do both together it crashes, like
Ausnahme (erste Chance) bei 0x69BF8A78 (nvoglv32.dll) in Rpg.exe: 0xC0000005: Zugriffsverletzung beim Schreiben an Position 0x070B6000
Falls ein Handler für diese Ausnahme vorhanden ist, kann das Programm möglicherweise weiterhin sicher ausgeführt werden.