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

Author Topic: Run-Time Check Failure #2  (Read 3213 times)

0 Members and 1 Guest are viewing this topic.

timo777

  • Newbie
  • *
  • Posts: 37
    • View Profile
Run-Time Check Failure #2
« on: December 22, 2012, 12:38:07 pm »
I am using Windows 64 bit and SFML 2.0. Now, if I close the window on the normal way, i get the following error:

Run-Time Check Failure #2 - Stack around the variable 'window' was corrupted.

And randomly sometimes not that one but:

Run-Time Check Failure #2 - Stack around the variable 'shape' was corrupted.

I am trying to compile just the standard 'setting up' tutorial code so this shouldn't be a problem. I don't think I have used any release things. After commenting a bit the error doesn't appear without:

sf::CircleShape shape;

Does anyone know the answer?

Edit: so the error occurs at the end of the main() function but is somehow caused by that single line...
« Last Edit: December 22, 2012, 01:49:51 pm by timo777 »

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

timo777

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Run-Time Check Failure #2
« Reply #2 on: December 22, 2012, 01:47:09 pm »
Sorry, but I am new here.

I have an AMD Radeon graphics card, I don't know the exact number. I am using the static version of SFML. If the line of code given is not enough, look at the tutorial code. I only changed the constructor call of that line, not more. This is the call stack:

   Client.exe!main() Line 24   C++                                                             //Line 24 is end of main() function.
    Client.exe!__tmainCRTStartup() Line 536   C
    Client.exe!mainCRTStartup() Line 377   C
    kernel32.dll!749833aa()   Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]   
    ntdll.dll!77249ef2()   Unknown
    ntdll.dll!77249ec5()   Unknown

I am using the normal 2.0 RC version of SFML.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

timo777

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Run-Time Check Failure #2
« Reply #4 on: December 22, 2012, 02:05:32 pm »
The point is I get this error when the window closes and I didn't mix up release and debug libraries. I will proberly compile SFML but it shouldn't be needed. I know I had it working some time ago on the same computer and things.

And I tought Google would display all posts... :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Run-Time Check Failure #2
« Reply #5 on: December 22, 2012, 06:27:20 pm »
What's your compiler, and which version of SFML 2 do you use?
Laurent Gomila - SFML developer

timo777

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Run-Time Check Failure #2
« Reply #6 on: December 22, 2012, 08:22:37 pm »
I use the default MS Visual Studio 2012 compiler. And I don't know what exact version of SFML 2.0 I am using but I also tried the latest nightly build now.

Edit: I will just try to not use the sf::Shape class and hopefully there wouldn't go anything else wrong... :)
« Last Edit: December 22, 2012, 08:25:03 pm by timo777 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Run-Time Check Failure #2
« Reply #7 on: December 22, 2012, 08:51:11 pm »
You should try to compile SFML yourself.

Quote
I will just try to not use the sf::Shape class and hopefully there wouldn't go anything else wrong...
I don't think do. There's no known bug with this class (especially the "getting started" code), so you're likely to get more errors. I really think it's an environment problem.
Laurent Gomila - SFML developer

timo777

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Run-Time Check Failure #2
« Reply #8 on: December 22, 2012, 11:50:07 pm »
Until now everything works fine, including networking examples.