Why is Codeblocks terminating my program with Status 3?
I'm programming with SDL and CodeBlocks. The problem I have is when I initialize
a surface the program crashes...every time. It actually comes on for a split
second...and then crashes
Here is my initialization:
message = TTF_RenderText_Solid(funnyFont, "25", textColor);
- where message is a pointer to create a surface
- program runs fine when I take the message initialization out
I have used this a million times and have never had this problem. The only
difference is the program that this initialization belongs is pretty big. Can
anyone tell what the problem is. Thanks.
I haven't ever had this problem/I have never used codeblocks so not exactly sure what the problem is.
You should double check to make sure your font was loaded in correctly.
You could also try TTF_GetError()/SDL_GetError() to see if they provide any useful info.
if(!(message = TTF_RenderText_Solid(funnyFont, "25", textColor))
cout << TTF_GetError() << endl;
It may also be a problem with another part of your code that is interfering, hard to tell.
Yay. One line of code. May favorite thing to debug.
Maybe you should provide a little more context.
Thanks! I did not even initialize funnyFont. Program runs smooth
...always those little things. lol @ cire. Those tend to be the best learning experiences...
at least for me.
Topic archived. No new replies allowed.