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

Author Topic: SFML2: Error on exit  (Read 7087 times)

0 Members and 1 Guest are viewing this topic.

pixelond

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML2: Error on exit
« on: May 18, 2010, 12:45:18 pm »
Hi.
I got this error on exit:

The thread 'Win32 Thread' (0xfd4) has exited with code 0 (0x0).
First-chance exception at 0x6903a990 in sfml2_.exe: 0xC0000005: Access violation reading location 0x00000054.
Unhandled exception at 0x6903a990 in sfml2_.exe: 0xC0000005: Access violation reading location 0x00000054.


Win XP, VS 2008, ATI card.

VS shows:



The same code works ok on SFML 1.6.

Help.

sirGustav

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML2: Error on exit
« Reply #1 on: July 21, 2010, 01:31:47 pm »
I had the exactly the same error. I updated to the latest revision and now it crashes in atioglxx.dll. I am unable to reproduce this issue with the opengl/window samples so I am not sure it's related to sfml.

revision 1534, statically linked, win7 (x64), vs2008 express, ati mobility radeon 5650

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML2: Error on exit
« Reply #2 on: July 21, 2010, 01:39:19 pm »
This is a known bug with ATI cards.

Quote
I updated to the latest revision and now it crashes in atioglxx.dll

Do you mean that it worked with a previous revision of SFML 2?
Laurent Gomila - SFML developer

sirGustav

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML2: Error on exit
« Reply #3 on: July 21, 2010, 01:51:10 pm »
Quote from: "Laurent"
This is a known bug with ATI cards.
If it is a known bug, do you know if there are known fixes or known workarounds? As the op says his/her code worked in 1.6 and my samples doesn't crash.

Quote from: "Laurent"
Quote
I updated to the latest revision and now it crashes in atioglxx.dll

Do you mean that it worked with a previous revision of SFML 2?
Unfortunately no. The previous revision(don't know the number) had the same crash-location as OP, the latest revision just gave another crash-location :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML2: Error on exit
« Reply #4 on: July 21, 2010, 02:00:53 pm »
Quote
If it is a known bug, do you know if there are known fixes or known workarounds?

Nop. Unless you change your graphics card :)

Quote
As the op says his/her code worked in 1.6

This is normal.

Quote
and my samples doesn't crash.

This is not normal. You may have a different issue, you should do more tests to figure out what happens exactly, and why the samples work.
Laurent Gomila - SFML developer

sirGustav

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML2: Error on exit
« Reply #5 on: July 21, 2010, 03:06:43 pm »
Quote from: "Laurent"
Quote
and my samples doesn't crash.

This is not normal. You may have a different issue, you should do more tests to figure out what happens exactly, and why the samples work.

I sure hope so. The code worked fine on my other nvidia based computer, and this ati based one runs batman, fable and other gl and dx based games, so it _should_ work  :?

Will report back here if I find anything useful

sirGustav

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML2: Error on exit
« Reply #6 on: July 23, 2010, 12:45:30 pm »
ok... now I have investigated this issue further:

Updated configurations: I am linking dynamically to sfml... not statically as previously mentioned and the new crash location in atioglxx.dll was my bad(forgot to update the dlls).

With that out of the way, my crash location is the same as OP. And it crashes the third time in the wgl destructor(dynamic atexit destructor for 'referenceContext').
This crashes both for the samples and for my project... however with static linking it doesn't crash.. and from what I can tell, the arguments and wgl members look the same.

Something to watch out for: I had trouble running the dynamically linked version through visual studio, it might be me but vs ran the statically linked version even though I had Debug DLL selected in the solution configuration..

tl;dr: Both samples and my project crashes with dynamic linking in ~WglContext() beloning to referenceContext. Static linking doesn't crash.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML2: Error on exit
« Reply #7 on: July 23, 2010, 02:21:55 pm »
Ok, so... this is normal :)
Laurent Gomila - SFML developer

sirGustav

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML2: Error on exit
« Reply #8 on: July 23, 2010, 02:35:10 pm »
If I understood you correctly, applications with sfml dynamic linking crashes on ati cards is normal (the known bug), and the solution is to link statically, right?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML2: Error on exit
« Reply #9 on: July 23, 2010, 03:27:30 pm »
Absolutely. Until I fix it.
Laurent Gomila - SFML developer

sirGustav

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML2: Error on exit
« Reply #10 on: July 23, 2010, 03:32:43 pm »
ok, thanks for the support.. if you need any ati tests or more information, let me know and I might be able to help :)

hope this also "solves" the problem the OP had, i.e: link statically to avoid crash at axit on ati-cards

Ekinox

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML2: Error on exit
« Reply #11 on: May 03, 2011, 06:34:59 pm »
Hmmm ... I have the same bug, not fixed yet ? (one year later ...  :lol: )

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
SFML2: Error on exit
« Reply #12 on: May 03, 2011, 08:01:22 pm »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything