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

Author Topic: [SFML 2.0] Access violation (debugging)  (Read 3624 times)

0 Members and 1 Guest are viewing this topic.

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
[SFML 2.0] Access violation (debugging)
« on: September 03, 2012, 09:40:00 pm »
So, I recently switched from sfml 1.6 to sfml 2.0.
Now I get this error

Unhandled exception at 0x55520481 in New Game.exe: 0xC0000005: Access violation reading location 0x00000008.

However I only get it upon exiting/shutting down the program. Normally the compiler would attempt to point me in the direction of the transgressive code, but after the first error message I get this:

There is no source code available for the current location.

and an option to show disassembly.

I am very sorry to say that I can make neither head nor tails of disassembly code.
Does anyone have any tips/solutions or a good way to try debugging this?
« Last Edit: September 03, 2012, 09:57:01 pm by natchos »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11047
    • View Profile
    • development blog
    • Email
Re: [SFML 2.0] Acess violation (debugging)
« Reply #1 on: September 03, 2012, 09:50:44 pm »
You still could trace the calls back with the callstack provided in VS, but you'd eventually end up in some SFML resource/context code and wouldn't be able to figure out what goes wrong either.

You need to provide a bit more information so we can say what porbably happens. ;)
What exacte version of SFML 2 are you using?
Do you link dynamic or static?
Do you compile in debug or release mode?
Do you use the default font?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
Re: [SFML 2.0] Acess violation (debugging)
« Reply #2 on: September 03, 2012, 10:00:12 pm »
You still could trace the calls back with the callstack provided in VS, but you'd eventually end up in some SFML resource/context code and wouldn't be able to figure out what goes wrong either.

You need to provide a bit more information so we can say what porbably happens. ;)
What exacte version of SFML 2 are you using?
Do you link dynamic or static?
Do you compile in debug or release mode?
Do you use the default font?

How do you check what version of SFML you are using?
I am using dynamic linking.
Compiling in debug.
Do I use the default font in what? In all my sf::Text objects yes I am using default font.

Also, just in case it matters: I'm using visual c++ 2008 express

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11047
    • View Profile
    • development blog
    • Email
Re: [SFML 2.0] Access violation (debugging)
« Reply #3 on: September 03, 2012, 11:07:04 pm »
How do you check what version of SFML you are using?
I guess you just downloaded the RC release from the download page.

I guess you're experiencing the default font problem, but that's just a guess...
You can test that 'theory' by using a diffrent font and passing it to the sf::Text instance via the constructor or by removing all the text objects to see if you still get the crash at exit.

If we should look more into it you need to provide a minimal and complete example that also crashes on exit.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
Re: [SFML 2.0] Access violation (debugging)
« Reply #4 on: September 06, 2012, 10:56:08 am »
Yup, that fixed it ^^ However, now no text prints on screen at all :P

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11047
    • View Profile
    • development blog
    • Email
Re: [SFML 2.0] Access violation (debugging)
« Reply #5 on: September 06, 2012, 11:01:21 am »
You probably did something wrong, but without code we can't help. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

natchos

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Email
Re: [SFML 2.0] Access violation (debugging)
« Reply #6 on: September 07, 2012, 07:32:17 am »
Aye, knowing myself I presumably linked an invalid file or fileformat or something. ^^