I was looking through the sample code at
C++ TTF_RenderText_Solid Examples - HotExamples[
^] and none of them create a
SDL_Surface
object. They use the pointer returned from
TTF_RenderText_Solid
. You might want to start by removing that object creation call.
Beyond that, I would probably resort to printf-style debugging using the tracing mechanism of your choice.