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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cooldog99

Pages: 1 ... 5 6 [7]
91
General / please help!!! SFML Crash on App.Clear() and App.Display()
« on: February 18, 2011, 06:46:36 pm »
Quote from: "Contadotempo"
Quote from: "cooldog99"

but if I uncomment App.Clear and App.Display

it brings an error here
Code: [Select]
     
 App.Clear(sf::Color(130, 130, 255)); <- Here
  App.Display();



The only possible error I see there is the missing alpha argument on sf::Color, but even then it should compile with default 255 alpha.

What errors did you get on exit?
What if you try using non-debug libs or static?


no errors on exit (my fault lol), I'm using debug libs for debug, NOT static.

92
General / please help!!! SFML Crash on App.Clear() and App.Display()
« on: February 18, 2011, 04:25:23 am »
Quote from: "DoctorJ"
Well,, the code is inherently ok but something is amiss. You can try the following:
Code: [Select]
//#include <SFML/System.hpp>
//#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
   sf::RenderWindow App(sf::VideoMode(400, 200, 32), "Test Program");
   while (App.IsOpened())
   {
        sf::Event Event;
        while (App.GetEvent(Event))
        {
               // Window closed
               if (Event.Type == sf::Event::Closed)
                   App.Close();

               // Escape key pressed
               if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
               App.Close();

               // "M" key pressed
               if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::M))
               std::cout << "M";

        }

//        App.Clear(sf::Color(130, 130, 255));
//        App.Display();
   }
    App.Close();
    return EXIT_SUCCESS;
}

This should present an "empty" window and when you type "m", it will appear in the console window.
Also, perhaps check on the order of the library linking - I think you need to be sure "graphics" preceeds "window"


Ran your code and it works perfectly fine.

but if I uncomment App.Clear and App.Display

it brings an error here
Code: [Select]
     
 App.Clear(sf::Color(130, 130, 255)); <- Here
  App.Display();


Also the code you gave me only errors on Exit...

93
General / please help!!! SFML Crash on App.Clear() and App.Display()
« on: February 17, 2011, 10:16:05 pm »
Quote from: "DoctorJ"
I just ran your code on my Code::Blocks system - works ok. The problem must lie with libraries and or settings. For example, CB/mingw needs that darn "libgcc_s_dw2-1.dll" to execute. Perhaps something got deleted or corrupted or a directory changed - something to that effect.


Just downloaded them again and reset all of them...still nothing...

=/

94
General / please help!!! SFML Crash on App.Clear() and App.Display()
« on: February 17, 2011, 09:49:04 pm »
Quote from: "ThunderManEX"
Any recent updates to your ATI drivers?


Not that I know of.

if it helps I have an ATI RadeonX1200

95
General / please help!!! SFML Crash on App.Clear() and App.Display()
« on: February 17, 2011, 09:29:13 pm »
Ok, so I've been using sfml for the past 2 weeks, was awesome.
Starting making a BIG project, and all of a sudden my programs that use sfml went to sh*t.

It seems to crash at App.Clear() or App.Display()
I've used both Window and RenderWindow and before using RenderWindow works great.

I recently had a stable game, saved it. next day I go to load it and run it, it crashes on those lines, why?

Here's a sample code.
Code: [Select]

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>


int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Test Program");
while (App.IsOpened())
{
        sf::Event Event;
        while (App.GetEvent(Event))
        {
               // Window closed
               if (Event.Type == sf::Event::Closed)
                   App.Close();

               // Escape key pressed
               if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
  App.Close();


        }

        App.Clear(sf::Color(130, 130, 255));
        App.Display();
}
    App.Close();
    return EXIT_SUCCESS;
}


I originally used CodeBlocks as my IDE, and it started crashing there.
Tried VC++ and it crashed there as well.

I am using -d libs for debugging.
and not using release for debug.

my libs are correct, and this suddenly started happening.

It's frustrating me to the point of not wanting to program anymore, please help!

//Edit if it helps any:
SFML-1.6
CodeBlocks

SFML-1.6 VC++ version, VC++2008

Windows vista, 3gb ram, dual core processor, yada-yada...

Pages: 1 ... 5 6 [7]