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

Author Topic: Error loading Image with SFML [Solved]  (Read 4003 times)

0 Members and 1 Guest are viewing this topic.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Error loading Image with SFML [Solved]
« on: November 02, 2008, 01:47:38 am »
OK, this has been driving me crazy for a couple weeks now. If anyone can help I'd really really appreciate it.

I've been developing a game for a while and have been making good progress. My development machine is running Vista x64. My game runs great on my development machine. Anyway, my program crashes and dies on two other machines I've tried it on - they are both running XP x32. Anyway, I went ahead and grabbed the latest SVN version today and compiled the opengl example with full debug symbols (so it's opengl-d.exe). It runs fine on my development machine, but crashes with no error message on both XP computers I have access to.

So I've been running a remote debugging session (with gdbserver) and I've tracked the crash down the some. The crash happens on line 23 of opengl.cpp where it goes to load the background image from disk. From there execution makes it to the sf::Image::CreateTexture() function. On line 625:

Code: [Select]
GLCheck(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, myTextureWidth, myTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, GetPixelsPtr()));


From there the GetPixelsPtr() function is called. That function seems to return (&myPixels[0]) successfully and then the app crashes. So I assume the crash is in GLCheck on line 625 of Image.cpp.

A final back trace shows that it segfaults somewhere in atioglxx.dll, which is an ATI driver.

Like I said, I'm using an SVN revision downloaded today.

Just wondering if anyone had any advice, or has had any similar problems. I going to keep trying, but any advice would be greatly appreciated.

Thanks!

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Error loading Image with SFML [Solved]
« Reply #1 on: November 02, 2008, 01:55:01 am »
BTW, in case anyone got lost in the details above, my symptoms are that any Image::LoadFromFile() or Image::LoadFromMemory() fails with a seg fault.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Error loading Image with SFML [Solved]
« Reply #2 on: November 02, 2008, 03:07:27 am »
Alright, I'm still working on this. I can confirm that the code crashes at the same place (Image.cpp line 625) on another XP computer with integrated graphics (don't remember which brand). I can also confirm that it works fine on a third computer running XP 32 bits. I really don't know what to think now.

Do some drivers/graphics cards not properly support glTexImage2D()? This is driving me nuts now.


BTW, something else I've noticed (unrelated to this problem) is that the included OPENAL32.DLL depends on MSVCR80.DLL which isn't included with SFML. Two out of the three XP computers I tested on did not have it installed. I got a "The application failed to initialize properly" error until I installed the MS redistributables. Just thought I'd throw that out there.

Wizzard

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Error loading Image with SFML [Solved]
« Reply #3 on: November 03, 2008, 08:29:31 am »
I'm sorry that I don't have any good news to report, but I figured I would tell you that this driver problem has been identified by other SFML users too and currently has no known fix.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Error loading Image with SFML [Solved]
« Reply #4 on: November 04, 2008, 02:40:38 am »
Thanks for pointing that out. I didn't see that.

I have the problem occurring on two computers. One has an ATI Radeon 9550 Mobile, the other has an Invidia Geforce2 MX 200. Both have Windows XP 32 bit and neither has the latest drivers installed. I'd much rather have a robust program that runs with old drivers. I do not expect my target audience to regularly update their graphics drivers (or anything else for that matter).

Anyway, thanks again for your reply. I'll keep researching.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Error loading Image with SFML [Solved]
« Reply #5 on: November 20, 2008, 09:18:37 pm »
This was solved over here.