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

Author Topic: Possible error with Windows 8  (Read 4562 times)

0 Members and 2 Guests are viewing this topic.

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Possible error with Windows 8
« on: December 27, 2012, 05:07:55 am »
I recently made the switch to Windows 8 (from Windows 7) and have not had a pleasant time moving my code over. This code, which is just a combination of the examples for sf::Text and the Visual Studio set-up example, works on my old machine -

#include <SFML\Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML doesn't work :(");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);
    // Create a text
    sf::Text text("hello");
    //text.setCharacterSize(30);
    //text.setStyle(sf::Text::Bold);
    //text.setColor(sf::Color::Red);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        //window.draw(text);
        window.display();
    }

    return 0;
}
 

- but produces the following error "Access violation reading location 0xfeeefef6" on the new one. Both machines have the same version of SFML (2.0, downloaded from the RC page), are linked in the exact same manner, and have the exact same code. I also created a new solution instead of simply copying over an old one, which didn't fix the problem. From some other posts on the forums it appears that a few other people are having issues running code with Windows 8. Is there a reason for this? If there is, is a fix available or when can one be expected?

If it makes any difference, the issue appears to occur when I instantiate the sf::Text object, as commenting that line out eliminates the error. Does anyone have any insight into this problem?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Possible error with Windows 8
« Reply #1 on: December 27, 2012, 08:44:55 am »
Which version of Visual Studio do you use on Windows 8?
Laurent Gomila - SFML developer

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Possible error with Windows 8
« Reply #2 on: December 27, 2012, 09:23:31 am »
I'm using Visual C++ 2010 Express on both computers. Both have the Visual C++ 2010 version of SFML, as well.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Possible error with Windows 8
« Reply #3 on: December 27, 2012, 09:42:27 am »
Can you try to recompile SFML?
Laurent Gomila - SFML developer

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Possible error with Windows 8
« Reply #4 on: December 27, 2012, 10:13:29 am »
I'll give it a shot tomorrow and get back with the results.

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Possible error with Windows 8
« Reply #5 on: December 27, 2012, 08:56:24 pm »
The error is still occurring even after a recompilation of SFML. I think at this point I'll just keep on going, since the error only occurs when I shut down the program. Everything else is executing properly. Hopefully a fix is found before the final release comes out, but until then I'll just deal with it! Thanks for the help!

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Possible error with Windows 8
« Reply #6 on: December 27, 2012, 09:12:46 pm »
Are you sure you recompiled latest version and removed the old one properly? How did you test text, you couldn't just use code from first post because default font is missing from latest source. I'd guess that was messing up, that's why it got removed.
Back to C++ gamedev with SFML in May 2023

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Possible error with Windows 8
« Reply #7 on: December 27, 2012, 09:15:12 pm »
Ah, I forgot to remove the old version...   :-[

I'll see if it works now.

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Possible error with Windows 8
« Reply #8 on: December 28, 2012, 04:55:11 am »
It looks like all of my problems are solved!  ;D

I'd like to say thanks specifically to eXpl0it3r for providing his nightly builds, since I wasn't building SFML correctly (or something like that). Thanks to his efforts to making SFML accessible to everyone, I was able to resolve the issue.

For the record, the current release does not seem to have any issues with Windows 8, I'm just really bad at building SFML. Once again, thanks for all the help! Without the forums and all the wonderful people on them I'd still be scratching my head and pulling my hair out.  :D



As a side note, it might be nice to provide a link to eXpl0it3r's nightly builds on the downloads page of the SFML site, as it might be helpful to others if they experience similar difficulties in building SFML on their own.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Re: Possible error with Windows 8
« Reply #9 on: December 28, 2012, 09:05:46 am »
I'd like to say thanks specifically to eXpl0it3r for providing his nightly builds.
I'm glad that they helped and I hope that you'll figure out what the problem was, so you'll be able to build libraries on your own, since it's an important process in programming. ;)

As a side note, it might be nice to provide a link to eXpl0it3r's nightly builds on the downloads page of the SFML site, as it might be helpful to others if they experience similar difficulties in building SFML on their own.
Well they're called 'Unoffical Nightly Builds' for a reason and unfortunatly Laurent doesn't have the time to work on the website and probably won't others work on it. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

massive_potato

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: AW: Re: Possible error with Windows 8
« Reply #10 on: December 28, 2012, 07:18:44 pm »
Quote
I'm glad that they helped and I hope that you'll figure out what the problem was, so you'll be able to build libraries on your own, since it's an important process in programming.  ;)

I'm definitely planning on it, but until the day comes where I'm finally able to do so, your nightly builds are gonna be nice to have around.  :D

Quote
Well they're called 'Unofficial Nightly Builds' for a reason and unfortunately Laurent doesn't have the time to work on the website and probably won't others work on it.  ;)

I guess that makes sense. Getting the next version prepped for release should definitely take precedence. Once that's released there won't be much of a need to make nightly builds anyway.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: AW: Re: Possible error with Windows 8
« Reply #11 on: December 28, 2012, 07:43:36 pm »
I guess that makes sense. Getting the next version prepped for release should definitely take precedence. Once that's released there won't be much of a need to make nightly builds anyway.
Well it still makes sense, not the same sense but still. ;)
Currently many people use it, because they want to use SFML 2, but don't want to use the already quite old RC version and because there isn't an official stable version.

But once there's a stable version, I guess many will use that version, but the development of SFML won't just stop there (well okay if we EVER get to a final version ;D), but there will be SFML 2.1 etc. Some people like to always be uptodate, but don't want to go through the whole procedure every time; for those, my Nightly Builds will be of use. :)

I personally would like it, if more library-communities would provide nightlies, so I wouldn't have to figure out for each one, how to set it up properly...
« Last Edit: December 28, 2012, 07:45:09 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/