Sorry to post so many times in a row, but I found a solution.
The program only crashes when I use a vector of my button class. If I make it a vector of pointers, it works. Anyone know why this is? (Not a big deal, pointers are fine, I simply don't understand why that would cause a crash).
I have also tried freeing the rendered text surface immediately after creation, and the program crashes, yet the pointer is not NULL. Again, my other programs work just fine with TTF, what on earth could the issue be?
Edit: Finally got a crash report (Only does it once out of every 10 runs )
Problem Event Name: APPCRASH
Application Name: Space Invaders.exe
Application Version: 0.0.0.0
Application Timestamp: 51e53cc5
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdb3b
Exception Code: c0000005
Exception Offset: 000335f2
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: e3cc
Additional Information 2: e3cc0ee538989a7b66ab90686b3c00a6
Additional Information 3: d22a
Additional Information 4: d22a3993b2d48ddd96705e026b50390c
Thanks for the replies! As far as I can tell (with error checking) the pointers are valid. I set up error checking and not a single error occurs. The program just crashes when a text rendered surface hits the blit function.
Are you sure mFonts[strFont] does not return a null pointer?
Yes, I have even tried filling in all the render text solid parameters with solid values, generated IN that function, and the crash still occured at the blit function.
I have been using SDL (pre 2.0) with SDL_ttf, SDL_image and irrKland (for audio). I have started touching on OpenGL, but that is mostly for fun at the moment. Lazy Foo is THE site to learn SDL and OpenGL. He doesn't really go into game mechanics much, but the APIs he covers very well. Then I would hit up StaysCrisps tutorials over at DreaminCode, as he has a wonderful intro game engine design tutorial series (he now also recommends a book called SDL Game Development, looks great and teaches TinyXML, I cant WAIT to get this =D ).
I have been looking for someone to program with (I am terrible at art) and my custom game engine (using SDL and irrKlang) is nearing completion, let me know if you and your friend would like an extra partner =) !