Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Test Code ends with Exception  (Read 689 times)

0 Members and 3 Guests are viewing this topic.

NewbieProgrammer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Test Code ends with Exception
« on: February 06, 2025, 11:45:35 am »
Hello, I'm very new to SFML and pretty much very beginner in C++, knowing core basics, so I decided to better it with SFML. I downloaded the latest 3.0.0 version of SFML for Visual Studio 2022 on Windows 10. Did everything like in Tutorial on website, pasted the test code and on the second line of test code: 
     
 sf::RenderWindow window(sf::VideoMode({200, 200}), "SFML works!");
I got an exception that stated:
             
_Mtx_internal_imp_t::_get_cs(...)-> was nullptr.
I tried googling this error for SFML but one discussion I found for different library said not to touch anything in the code. I then downloaded 2.6 version, reconnected it and it worked (drew circle). So, my guess, it may have something to do with the version. Is something wrong with my system or something with the SFML that it crashes like that, and can it be fixed?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: Test Code ends with Exception
« Reply #1 on: February 06, 2025, 12:42:48 pm »
Can you provide the full stack trace?

Are you using the debug libs in debug mode and the release libs in release mode?
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/