SFML community forums

General => General discussions => Topic started by: pixelond on May 18, 2010, 12:45:18 pm

Title: SFML2: Error on exit
Post by: pixelond 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:
(http://img375.imageshack.us/img375/8897/errorj.jpg)


The same code works ok on SFML 1.6.

Help.
Title: SFML2: Error on exit
Post by: sirGustav 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
Title: SFML2: Error on exit
Post by: Laurent 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?
Title: SFML2: Error on exit
Post by: sirGustav 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 :)
Title: SFML2: Error on exit
Post by: Laurent 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.
Title: SFML2: Error on exit
Post by: sirGustav 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 (http://code.google.com/p/pwn-engine/) 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
Title: SFML2: Error on exit
Post by: sirGustav 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.
Title: SFML2: Error on exit
Post by: Laurent on July 23, 2010, 02:21:55 pm
Ok, so... this is normal :)
Title: SFML2: Error on exit
Post by: sirGustav 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?
Title: SFML2: Error on exit
Post by: Laurent on July 23, 2010, 03:27:30 pm
Absolutely. Until I fix it.
Title: SFML2: Error on exit
Post by: sirGustav 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
Title: SFML2: Error on exit
Post by: Ekinox on May 03, 2011, 06:34:59 pm
Hmmm ... I have the same bug, not fixed yet ? (one year later ...  :lol: )
Title: SFML2: Error on exit
Post by: Nexus on May 03, 2011, 08:01:22 pm
http://www.sfml-dev.org/forum/viewtopic.php?t=4420