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

Author Topic: game.exe has stopped working!  (Read 1940 times)

0 Members and 1 Guest are viewing this topic.

Allptraum

  • Newbie
  • *
  • Posts: 7
    • View Profile
game.exe has stopped working!
« on: November 13, 2015, 11:59:47 pm »
Hello. I made a pong-copy for my school project.
I have to do a presentation about game developers, so i devided, to show the class the source of a little game.
This is why everything is in the main.cpp. Usually i dont do this :D

The Game works fine, aslong i run it in VS12.
If i run the .exe in my explorer it works for about 3 seconds and it crashes! pong.exe stopped working!

I compile it in the release mode. It is a Win32 project and i linked the sfml-name-s.lib libs

Heres my Quellcode  (the RenderWindow instance isnt global!)

http://pastebin.com/7PXsVG7w

Please help me! I have this problem on nearly EVERY sfml program wich uses the RenderWindow instance!
« Last Edit: November 14, 2015, 12:04:35 am by Allptraum »

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: game.exe has stopped working!
« Reply #1 on: November 14, 2015, 01:38:48 am »
Globals? Really?

Why are you passing (a pointer to) the render window to the load texture function and using then its size. The render window hasn't even been 'created' by this point!

It doesn't look like you're processing any of the window's events. You should very carefully read this tutorial before continuing.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*