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

Author Topic: [sf::Font] Memory violation  (Read 1398 times)

0 Members and 1 Guest are viewing this topic.

wormpattern

  • Newbie
  • *
  • Posts: 5
    • View Profile
[sf::Font] Memory violation
« on: October 21, 2012, 07:58:22 pm »
Hello,

I am getting memory access error while trying to run code (SFML 2.0):

sf::Font font;
font.loadFromFile("arial.ttf");

Unhandled exception at 0x6d5a1f16 in test.exe: 0xC0000005: Access violation reading location 0x003b2000.

from debugger:
+      font   {m_library=0xbaadf00d m_face=0xbaadf00d m_streamRec=0xbaadf00d ...}   sf::Font

font file is present and accessible.

Any idea on it?


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [sf::Font] Memory violation
« Reply #1 on: October 21, 2012, 08:27:27 pm »
Which compiler?

If VC++11 (Visual Studio2012), have you recompiled SFML?
« Last Edit: October 21, 2012, 08:30:31 pm by Laurent »
Laurent Gomila - SFML developer

wormpattern

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [sf::Font] Memory violation
« Reply #2 on: October 21, 2012, 08:36:25 pm »
Hello, its VS 2010 express. I didnt recompile it actualy, just took as it is.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [sf::Font] Memory violation
« Reply #3 on: October 21, 2012, 09:45:38 pm »
Are you sure that you're not mixing static/dynamic, or debug/release? Can you show a complete and minimal code that reproduces the problem?
Laurent Gomila - SFML developer

wormpattern

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [sf::Font] Memory violation
« Reply #4 on: October 21, 2012, 11:41:15 pm »
Hello,

You are absolutly right I didnt used static libs. My fault and thanks for help.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [sf::Font] Memory violation
« Reply #5 on: October 22, 2012, 08:57:25 am »
"Not using the static libs" is not a mistake ???
Laurent Gomila - SFML developer

 

anything