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

Author Topic: 2 Problems  (Read 18806 times)

0 Members and 1 Guest are viewing this topic.

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
2 Problems
« Reply #15 on: October 10, 2008, 12:56:00 am »
Wow ! Thanks for all your investigations.

I thinks that we have a similar issue here (crash only in release, on RenderWindow instanciation).

I see if i can find something with all your infos (but RenderWindow never crashed on my computer =( ).

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #16 on: October 10, 2008, 09:45:34 am »
In this post fixus971 mentions he's using Windows 2000, too, just like me. In another post he says "I tested on WinXP SP2 with framework 2 just installed" - the question is: did he compile it on Windows 2000 and then did run it on Windows XP or did he both compile and run it on Windows XP? So maybe it all is a problem only when compiling on Windows 2000.

Update: I found a nice article about the differences between Debug and Release builds and how to find bugs in the later one.

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #17 on: October 15, 2008, 10:23:48 am »
Short update:

Yesterday I tried r908 (HEAD) of SFML because the changes in r901 sounded promising ("Fixed global graphics context sometimes initialized after global drawable objects") but "opengl.exe" still crashed in release mode.

In addition I tried switching off all the optimization in release mode (changed "/Ox" into "/Od") but that didn't help either.

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #18 on: October 15, 2008, 08:12:52 pm »
Another update:

disclaimer

I am using VC++ 2005 under Windows 2000 with a ATI Radeon 9800 Pro.


how to make it crash
[list=1]
  • get SFML r652
  • set build mode to "Release static"
  • rebuild "opengl" (which builds "opengl" and all libraries it depends on)
  • run = crash[/list:o]
    how to make it NOT crash
    [list=1]
  • get SFML r652
  • set build mode to "Release static"
  • in the properties of "sfml-window" and "sfml-graphics" under "Configuration Properties" - "C/C++" - "Optimization" set "Optimization" to "Disabled (/Od)" and "Inline Function Expansion" to "Default"
  • rebuild "opengl" (which builds "opengl" and all libraries it depends on)
  • run = NO crash[/list:o]
    sidenote

    Because "Optimization" "Full Optimization (/Ox)" already includes "Inline Function Expansion" "Any Suitable (/Ob2)", "Optimization" must be "Disabled (/Od)" so that the setting for "Inline Function Expansion" itself actually counts.


    conclusion

    Due to inline function expansion it seems ""something"" gets ""inlined away"" and when that ""something"" is later accessed a crash occurs. Unfortunately I neither know what the mysterious ""something"" is nor why it gets ""inlined away"".

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
2 Problems
« Reply #19 on: October 15, 2008, 08:29:46 pm »
Hmm, why r652? It's so old...
Laurent Gomila - SFML developer

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #20 on: October 15, 2008, 08:31:56 pm »
Quote from: "Laurent"
Hmm, why r652? It's so old...

That's why:
Quote from: "T.T.H."
All revisions I tried up to 651 do work. All revisions I tried from 652 upwards (652, 675, 700, 774, 900) crash.

I'm trying to find the minimum amount of changes which lead to the crash - and they seem to be somewhere in revision 652.


If I try the very same on revision 980 instead of revision 658 then it crashes again (D'OH) but now it's in "atioglxx.dll" whereas the last functions before a long list of "atioglxx.dll" errors are "opengl.exe!sf::Image::CreateTexture()" and "opengl.exe!sf::Image::LoadFromFile()".

So currently I personally assume there are two different problems: the "inlining away" thing and the "atioglxx.dll" thing.

Beaker

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://corvuscorone.net/
2 Problems
« Reply #21 on: October 16, 2008, 07:32:19 am »
I was having lots of crashes with atioglxx.dll until I upgraded my graphics drivers. Have you tried that?

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #22 on: October 16, 2008, 10:21:14 am »
Quote from: "Beaker"
I was having lots of crashes with atioglxx.dll until I upgraded my graphics drivers. Have you tried that?

No. And I do not intend to.

I do have ATI Radeon 9800 Pro from Sapphire with 128 MB Ram on 400 Mhz running with a ATI Catalyst 4.4 driver version 6.14.0010.6436 on Windows 2000 SP 4. Obviously the Catalyst is pretty old (April 2004) but pretty stable so far (regarding games like Warcraft 3 and Guild Wars). First I strongly believe in "never change a running system" and second at some point next year I will buy a new PC anyway and till that I don't intend to "misconfigure" my current PC with driver installations.

As I said I believe there are two problems: so far I am stuck at the first one (bad inlining) and the second one (atioglxx.dll) is of no big relevance for me - at least not yet.

P.S.@Beaker: which driver version did you have before and which driver version do you have now?

zarka

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
2 Problems
« Reply #23 on: October 16, 2008, 10:51:01 am »
Quote from: "T.T.H."
First I strongly believe in "never change a running system"


well.. it obviously doesn't run stable anymore does it ;) well all jokes aside .. updating graphics drivers is a pretty safe thing to do. (i have never ever encountered errors in updating graphics drivers (though quite a few errors have been solved when doing this)) and The game you named Warcraft 3 and Guild Wars are quite old :) but then again since sfml is a 2d api one would expect it to run well on old hardware...
//Zzzarka

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #24 on: October 16, 2008, 11:10:48 am »
Quote from: "zarka"
well.. it obviously doesn't run stable anymore does it

It does run Warcraft 3, Guild Wars and SFML r651.

Quote from: "zarka"
updating graphics drivers is a pretty safe thing to do. (i have never ever encountered errors in updating graphics drivers (though quite a few errors have been solved when doing this))

I've been through a lot of pain myself regarding drivers and driver installations and I have witnessed scary stories of friends about updating drivers so I have absolutely zero zip zilch interest in touching them again.

On the other hand... I want SFML to work... *sigh*

Quote from: "zarka"
but then again since sfml is a 2d api one would expect it to run well on old hardware...

Yup, I'd hope so. And repeating myself (I must start sounding like a broken record) r651 works. So at some point something in SFML changed which causes a crash in "atioglxx.dll". I know it's not the fault of SFML because no OpenGL driver should ever crash but nevertheless there must be some relevant change in SFML. Maybe eventually it might be interesting to find out what that change is.


Anyway, back to optimistic ideas: some people in the official Neverwinter Nights forum (which is quite an old game, too, and which does use OpenGL, too) they say that at some point the "atioglxx.dll" of the Catalyst became "bugged" (something around Catalyst 4.3 or 4.4) and it helps to get the "atioglxx.dll" from Catalyst 4.2 (only that file, not the whole driver!) and put that file in the application directory. This looks like a nice try since it doesn't mess around with driver installations but only some file copying and so I might try that one out.

Funnily enough in the official AMD/ATI forums there is some similar suggestion with more modern games: "atioglxx.dll" from Catalyst 8.8 or 8.9 does crash while from Catalyst 8.7 or lower it does not crash.


But now for something completely different: does anybody of you intelligent guys have any idea what gets ""inlined away"" (in r652...) and why it gets ""inlined away"" and how I do proceed in debugging it?!?

Beaker

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://corvuscorone.net/
2 Problems
« Reply #25 on: October 16, 2008, 11:59:40 am »
Quote
P.S.@Beaker: which driver version did you have before and which driver version do you have now?


Can't remember what I was on, but now I'm on 8.530.0.0 for Win XP. For 2000 though there is 6.2. Although if everything else runs fine, I agree, don't fix what's not broken.

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #26 on: October 16, 2008, 09:56:37 pm »
Today I tried r910 in
- "Debug static"
- "Release static" with optimization and inlining turned off

with "atioglxx.dll"
- version 6.14.10.5646 from Catalyst 6.2 (extracted and put next to "opengl.exe")
- version 6.14.10.4273 from Catalyst 4.4 (my original graphics driver)
- version 6.14.10.4145 from Catalyst 4.2 (extracted and put next to "opengl.exe")
- version 6.14.10.4103 from Catalyst 4.1 (extracted and put next to "opengl.exe")

but it all crashes  :evil: (always somewhere in "atioglxx.dll")


Callstack in "Debug static"


Callstack in "Release static"



Function in "Image::CreateTexture()" that seems to work:
Code: [Select]
GLCheck(glBindTexture(GL_TEXTURE_2D, Texture));


Function in "Image::CreateTexture()" that seems to work not:
Code: [Select]
GLCheck(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, myTextureWidth, myTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, GetPixelsPtr()));
whereas "GetPixelsPtr()" returns not NULL but the casted array.




Back to the think tank...

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #27 on: October 16, 2008, 10:45:15 pm »
Think tank broke:

atioglxx.dll version 6.14.10.8086 from Catalyst 8.10 (from 15. Oct. 2008, so it's still hot!) simply exists(-1) during function
Code: [Select]
BestFormat = ChoosePixelFormat(myDeviceContext, &PixelDescriptor);
in function
Code: [Select]
void WindowImplWin32::CreateContext(const VideoMode& Mode, WindowSettings& Params)
but Catalyst 8.10 is waaaay newer than my graphics card, my graphics card driver or my operation system  (Catalyst 8.10 is made for WinXP, not Win2000) so I consider this neither a problem nor a solution (and I should try to stop cheating my operation system, me evul person).

:roll:

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
2 Problems
« Reply #28 on: November 25, 2008, 10:34:36 pm »
Good news:

Today I tried r927 of SFML, which includes the bugfix of Laurent (r924+) based on the error description of wizardofoz, as "Release static" with all optimization enabled (which is the default of SFML) but with all SSE optimizations turned off as described by spackle and it did work!!!

It seems my problems with "atioglxx.dll" have been solved by the issue addressed by wizardofoz and it seems my problems which I described as "inlined away" had been solved by the issue addressed by spackle.

@ Laurent: could you please have a look at spackle's findings regarding SSE and adjust the compile settings of SFML accordingly?

For info: I do have an "AMD Athlon XP 2000+" which actually runs at 1.7 GHz (which is the default, not overclocked) and has a "Palomino core" according to CPUID.

P.S.:  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
2 Problems
« Reply #29 on: November 25, 2008, 10:53:55 pm »
Quote
@ Laurent: could you please have a look at spackle's findings regarding SSE and adjust the compile settings of SFML accordingly?

Done ;)
Laurent Gomila - SFML developer

 

anything