Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mlopres

macrumors newbie
Original poster
Jan 12, 2010
4
0
So I'm using SDL to access the OpenGL framework and im developing on a MAC of course.

For those familiar with SDL, i'm using the SDL_loadBMP() function to load in a image file from the hardrive. The problem I'm having is as soon as the program reaches this line of code, the program shuts down, and I get no information in the XCODE Debugger Console. Except some copywright information about GBD being free software, etc etc. Then the console returns control to me with a command prompt "(gdb)". I get no return code from the application, and none of my debug information is showing up.

I know the app is dying right at the SDL_loadBMP() part, because when I comment out this section, or if I remove my "image.bmp" the program functions as normal. it seem to be an issue with just the actually loading of the file, not whether or not the file even exists.
 

holmesf

macrumors 6502a
Sep 30, 2001
528
25
So I'm using SDL to access the OpenGL framework and im developing on a MAC of course.

For those familiar with SDL, i'm using the SDL_loadBMP() function to load in a image file from the hardrive. The problem I'm having is as soon as the program reaches this line of code, the program shuts down, and I get no information in the XCODE Debugger Console. Except some copywright information about GBD being free software, etc etc. Then the console returns control to me with a command prompt "(gdb)". I get no return code from the application, and none of my debug information is showing up.

I know the app is dying right at the SDL_loadBMP() part, because when I comment out this section, or if I remove my "image.bmp" the program functions as normal. it seem to be an issue with just the actually loading of the file, not whether or not the file even exists.

It's entirely possible that SDL is not loading the .bmp correctly. I've experienced this in the past ... sometimes bitmap files store their height as negative in order to flip themselves vertically, but this can confuse SDL (as one example). My advice is trying to save the .bmp using a different program (which will perhaps format the .bmp correctly), or switching to use SDL_Image (which may use different code to load .bmp files).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.