Division by zero makes program hang

Andre wrote

I have read in the list that DirectX may mess with FPU flags, but I’m
using the windib driver, forced by a putenv. Does anyone know what may
be the cause of this?

As I’m using the windib driver, is it possible that some other library
I’m linking to is changing the FPU flag? I’m using SDL_image, SDL_mixer,
SDL_gfx, SDL_ttf and their supporting libraries, zlib, libpng, smpeg,
vorbis, mikmod, freetype and others, all of them included in the binary
distributions. I wrote the rest of the code myself, and can state that
I’m not messing with FPU flags (I don’t even know how to mess with them :slight_smile:

Thanks,

Andre

As I’m using the windib driver, is it possible that some other library
I’m linking to is changing the FPU flag? I’m using SDL_image, SDL_mixer,
SDL_gfx, SDL_ttf and their supporting libraries, zlib, libpng, smpeg,
vorbis, mikmod, freetype and others, all of them included in the binary
distributions. I wrote the rest of the code myself, and can state that
I’m not messing with FPU flags (I don’t even know how to mess with them :slight_smile:

Short of stepping through it in a debugger and watching what function
got called when the FPU control register changed, I can’t really guess.
Does DirectSound change it, too? You might be using that in SDL, even
with windib.

Also, you can always forcibly change it back in your own app with
something like _controlfp() or an asm block, once you figure out the
point where it’s getting changed.

–ryan.