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

Author Topic: My First SFML App error  (Read 3123 times)

0 Members and 1 Guest are viewing this topic.

magic711

  • Newbie
  • *
  • Posts: 5
    • View Profile
My First SFML App error
« on: January 30, 2015, 05:17:34 pm »
I followed exactly Tutorials for SFML 2.2->Getting started->SFML and Xcode (Mac OS X). The build is successful, but when I run it, it gave me
'window.draw(sprite);       Thread 1: EXC_BAD_ACCESS(code=EXC_I386_GPFLT)'

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10822
    • View Profile
    • development blog
    • Email
AW: My First SFML App error
« Reply #1 on: January 30, 2015, 05:21:15 pm »
And your OS version is? And you Xcode version is?
How exactly did you follow the tutorial? Did you do a forum and/or Google search first?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

magic711

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: My First SFML App error
« Reply #2 on: January 30, 2015, 06:38:46 pm »
OS X 10.9.5
Xcode 6.1.1
I followed steps here http://www.sfml-dev.org/tutorials/2.2/start-osx.php
I created an SFML app, then build and run, after run, I got this error. The program just hung. I did not make any change.
I tried to google, it seemed nobody had the same problem.
Thanks

magic711

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: My First SFML App error
« Reply #3 on: January 30, 2015, 06:47:06 pm »
// Load a sprite to display
    sf::Texture texture;
    if (!texture.loadFromFile(resourcePath() + "cute_image.jpg")) {
        return EXIT_FAILURE;
    }
    sf::Sprite sprite(texture);
Is there anything wrong here? Like I said, I did not touch anything here, they are all generated by creating SFML app.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: My First SFML App error
« Reply #4 on: January 30, 2015, 07:41:19 pm »
Did you updated your SFML version by any chance? I've seen that kind of crash when your header files don't match the binaries you're using. Make sure you have only one version of SFML installed and clean build your project.
SFML / OS X developer

magic711

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: My First SFML App error
« Reply #5 on: January 30, 2015, 08:19:43 pm »
I did installed the previous version before. But I did not get that version to work, so I gave up. Lately I wanna give SFML another try. I downloaded latest version 2.2. I deleted everything SFML related under /Library/Frameworks, and copied new 2.2 files to there. I installed SFML as frameworks since it is recommended.

I just deleted SFML files under /Library/Frameworks, and tried again, the problem persists. Is there any old files under some other folders I should delete? Thanks

verbrannt

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: My First SFML App error
« Reply #6 on: January 30, 2015, 09:32:13 pm »
Try to delete headers in /usr/local/include/SFML

magic711

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: My First SFML App error
« Reply #7 on: January 30, 2015, 09:48:13 pm »
Try to delete headers in /usr/local/include/SFML
Great. That worked. Thx a lot ;D

 

anything