I'm using a sfml compiled from master branch.
And i get
Access violation reading location exeption at program end:
//main.cpp
#include <SFML/Graphics.hpp>
#include <memory>
std::unique_ptr<sf::RenderWindow> w;
int main(int argc, char const* argv[])
{
sf::Texture t;
t.loadFromFile("texture.png");
w = std::make_unique<sf::RenderWindow>(sf::VideoMode(sf::Vector2u(320, 240)), "12",
sf::Style::Default);
return 0;
}
Callsatack:
vtm.exe!std::_List_const_iterator<std::_List_val<std::_List_simple_types<std::pair<void (*const)(void *),void *>>>>::operator*() Line 148 (c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\list:148)
vtm.exe!std::_List_iterator<std::_List_val<std::_List_simple_types<std::pair<void (*const)(void *),void *>>>>::operator*() Line 239 (c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\list:239)
vtm.exe!sf::priv::GlContext::cleanupUnsharedResources() Line 753 (***\sfml\src\SFML\Window\GlContext.cpp:753)
vtm.exe!sf::priv::WglContext::~WglContext() Line 152 (***\sfml\src\SFML\Window\Win32\WglContext.cpp:152)
vtm.exe!sf::priv::WglContext::~WglContext() Line 150 (***\sfml\src\SFML\Window\Win32\WglContext.cpp:150)
vtm.exe!std::default_delete<sf::priv::WglContext>::operator()(sf::priv::WglContext * _Ptr) Line 3142 (c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\memory:3142)
vtm.exe!std::unique_ptr<sf::priv::WglContext,std::default_delete<sf::priv::WglContext>>::~unique_ptr() Line 3254 (c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\memory:3254)
vtm.exe!`anonymous namespace'::GlContextImpl::`dynamic atexit destructor for 'sharedContext'() Line 182 (***\sfml\src\SFML\Window\GlContext.cpp:182)
ucrtbased.dll!00007fff5a124957() (Unknown Source:0)
ucrtbased.dll!00007fff5a124365() (Unknown Source:0)
ucrtbased.dll!00007fff5a12449a() (Unknown Source:0)
ucrtbased.dll!00007fff5a124b01() (Unknown Source:0)
ucrtbased.dll!00007fff5a123cd1() (Unknown Source:0)
ucrtbased.dll!00007fff5a123b7d() (Unknown Source:0)
ucrtbased.dll!00007fff5a123bea() (Unknown Source:0)
ucrtbased.dll!00007fff5a123e64() (Unknown Source:0)
ucrtbased.dll!00007fff5a1241f6() (Unknown Source:0)
vtm.exe!__scrt_common_main_seh() Line 297 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:297)
vtm.exe!__scrt_common_main() Line 331 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
vtm.exe!mainCRTStartup(void * __formal) Line 17 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
Am i doing something stupid?
ADD: should i post an issue on github instead this forum?