SDL_SetVideoMode crash with OpenGL in release only

Hi,

I’m having a problem with SDL, in the 1.2.6 Win32 binary form. My app works fine in debug and release mode on machine A. On machine B, it only works in debug mode. In release mode, it crashes inside SDL_SetVideoMode. The problem is reproducable down to just issuing two SDL functions back to back:

SDL_Init(SDL_INIT_VIDEO);
SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);

Machine A is running Windows XP with some kind of GeForce4 TI in it, and Machine B is running Windows 2k with a GeForce2 Go.

Someone seemed to be suffering from the same problem a few years ago according to the mailing list archives, but a solution was never found.

Surely someone else has run into this? What’s the problem?

Sorry guys. Bad debugging… the problem wasn’t in SDL_SetVideoMode. Ignore this.----- Original Message -----
From: Space Needle Exchange Program
To: sdl at libsdl.org
Sent: Monday, December 08, 2003 12:04 PM
Subject: [SDL] SDL_SetVideoMode crash with OpenGL in release only

Hi,

I’m having a problem with SDL, in the 1.2.6 Win32 binary form. My app works fine in debug and release mode on machine A. On machine B, it only works in debug mode. In release mode, it crashes inside SDL_SetVideoMode. The problem is reproducable down to just issuing two SDL functions back to back:

SDL_Init(SDL_INIT_VIDEO);
SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);

Machine A is running Windows XP with some kind of GeForce4 TI in it, and Machine B is running Windows 2k with a GeForce2 Go.

Someone seemed to be suffering from the same problem a few years ago according to the mailing list archives, but a solution was never found.

Surely someone else has run into this? What’s the problem?

Hi - could it be, that SDL uses the word “vector” somewhere?
I tried to define some altivec variables like

vector float myFloat4;

which works fine in standard C++ projects but not in SDL projects
(XCode, Mac OS X 10.3, SDL 1.2.6, Altivec extensions enabled).
When trying the above in a SDL project the compiler says something like
"parse error before float".

Another thing I encountered was that the compiler somhow did not like
std::abs() (cmath) anymore, complaining about that there are only the
double and float versions of this function available … straaange, and
this - too - only within SDL projects.

Oro?
Arne

Arne Claus wrote:

[strange altivec problems]

Ok - I found and fixed the problem.
The projects I tested the Altivec extensions on were old Projectbuilder
projects which have been converted by XCode. The new XCode project
template work fine.

Thx anyway
Arne

Ok - I found and fixed the problem.
The projects I tested the Altivec extensions on were old Projectbuilder
projects which have been converted by XCode. The new XCode project
template work fine.

For the record, the specific problem is almost certainly that gcc was
called without the -faltivec flag…without -faltivec, the "vector"
keyword and the intrinsic functions (vec_ld, vec_madd, etc) aren’t
recognized…and the error messages aren’t helpful in pointing this out.

–ryan.