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

Author Topic: Program crashes from Windows, not from IDE  (Read 2141 times)

0 Members and 1 Guest are viewing this topic.

papiertig0r

  • Newbie
  • *
  • Posts: 4
    • View Profile
Program crashes from Windows, not from IDE
« on: June 03, 2014, 10:22:53 pm »
Hello,

so I was trying to program something in SFML 2.1 with Microsoft Visual C++ 2010 Express. I downloaded and linked the 32bit version correctly and it all works fine - from the IDE.

When I double click on the .exe in windows, the window opens (filled with white) and windows says: "The .exe has stopped working."

I don't get it, because all the .dlls are in place (I even tried both linking dynamically and statically) and it works just fine when started from the IDE

>_o many despairs, such helpless

main.cpp
(click to show/hide)

map.h
(click to show/hide)

map.cpp is copied 1:1 from the SFML Tutorial for Designing your own Entitity with Vertex Shaders, Chapter Example Tile-Map (with two minor changes for supporting hexagonal tiles)
http://www.sfml-dev.org/tutorials/2.1/graphics-vertex-array.php#example-tile-map
« Last Edit: June 03, 2014, 11:08:10 pm by papiertig0r »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Program crashes from Windows, not from IDE
« Reply #1 on: June 03, 2014, 10:27:04 pm »
Without a minimal (and complete) example of your code that exhibits the problem, how do you expect us to help you? By guessing and looking in our crystal balls?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Program crashes from Windows, not from IDE
« Reply #2 on: June 03, 2014, 10:34:15 pm »
Indeed. Please read this thread carefully, in particular the post about minimal complete examples.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

papiertig0r

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Program crashes from Windows, not from IDE
« Reply #3 on: June 03, 2014, 10:44:04 pm »
ah silly me, I added the code in the Start post.

It is actually the SFML-Tutorial about vertices and views mashed together just for testing

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Program crashes from Windows, not from IDE
« Reply #4 on: June 03, 2014, 10:47:22 pm »
There's no way I'm going to read all of that now. That is certainly not a complete and minimal example of the problem (at least, I hope it is not).

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Program crashes from Windows, not from IDE
« Reply #5 on: June 03, 2014, 10:49:45 pm »
Read also the other posts in the thread I linked, such as "check basic stuff" and "give details". Seriously, read that thread carefully, it's annoying if we have to ask again and again just to see a meaningful problem description.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

papiertig0r

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Program crashes from Windows, not from IDE
« Reply #6 on: June 03, 2014, 11:05:34 pm »
the program works fine when started from the IDE so I just guessed it is not the code which is the problem - that's why I didn't add it in the first place.

I updated the code, it is much more minimal now.
« Last Edit: June 03, 2014, 11:08:29 pm by papiertig0r »

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Program crashes from Windows, not from IDE
« Reply #7 on: June 04, 2014, 02:33:21 am »
In the Debug and Release directories where the .exe files are, are the sfml related files there too?  If not than there's your problem but if so than I got no clue.
I have many ideas but need the help of others to find way to make use of them.

papiertig0r

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Program crashes from Windows, not from IDE
« Reply #8 on: June 04, 2014, 03:52:09 pm »
Can be closed.

the graphic in the release/graphics folder had the wrong size, whereas the graphic in the IDE had the right size.

 

anything