1

As the title says, my application hangs while running SDL_SetVideoMode, but only when i specify that I want to use OpenGL. Otherwise it initiates without any problem.

Edit: When waiting ~50 seconds, it manages to initiate.

Edit 2: Driver update solved it.

Code looks something like:

SDL_Init(SDL_INIT_VIDEO);
SDL_SetVideoMode(800, 600, 24, SDL_OPENGL);

Any ideas why this is happening?

Using Visual Studio 2010 and SDL/OpenGL libraries are linked as the should be (as far as i know).

genpfault
  • 51,148
  • 11
  • 85
  • 139
Softnux
  • 2,440
  • 4
  • 20
  • 21
  • 1
    That looks OK to me, are you sure it is not a drivers problem? Do you know for sure it crashes inside that function? And if so, did you use a debugger to see why/where it crashes? – Radu Jan 01 '12 at 23:55
  • It never crashes, just hangs. However, it seems that if I wait for ~50 sec, it manages to initialize. Will edit post. – Softnux Jan 02 '12 at 00:11
  • 1
    So I've just run into this exact same issue on Ubuntu Precise. Using a debugger I was able to track the problem down to a call to GLXMakeCurrent(); the application simply hangs at that function, sometimes for as long as 20-30 seconds, then continues as normal. As far as I know, my drivers are all up-to-date. Has anyone else had this issue in Ubuntu? – giogadi May 13 '13 at 19:17

2 Answers2

1

Driver update solved the problem!

Softnux
  • 2,440
  • 4
  • 20
  • 21
0

That looks OK to me, are you sure it is not a drivers problem? Do you know for sure it crashes inside that function? And if so, did you use a debugger to see why/where it crashes?

Radu
  • 923
  • 2
  • 9
  • 21