unhandled exception in0x00007FFFA07AD665 (ntdll.dll) (ED.exe): 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000759E963FE0)
This show up when I call window.draw() , and the programm runs just fine if I don't call window.draw().
Any idea how to fix this?
The code in main.cpp:
#include"includes.h"
//global variables declaration
lnt w_height=450,w_width=800;
lnt v_height=450,v_width=800;
sf::View view(sf::Vector2f(0,0),sf::Vector2f(1024,576));
UN*un;
int main()
{
//initiallization
_mkdir(".\\saves");//create save folder
MR_randomize();//reset seed
un=new UN_ML(0,"newfile");//set game universal object
//create window
sf::RenderWindow window(sf::VideoMode(800,450),"ED remake U0");
while(window.isOpen())
{//main loop
sf::Clock t;
sf::Event flag;
while(window.pollEvent(flag))
{//window events
if(flag.type==sf::Event::Closed)
{
window.close();
}
else if(flag.type==sf::Event::Resized)
{
w_height=flag.size.height;
w_width=flag.size.width;
v_height=192;
v_width=(lnt)(192.0/(real)w_height*(real)w_width);
view.setSize(w_width,w_height);
}
}
//perform tick
window.clear();
window.setView(view);
un->tick(&window,&view);
window.display();
//wait
while(t.getElapsedTime().asMilliseconds()<10)
{}
}
return 0;
}