I had SDL_TTF working in a few easy test programs, and decided to try out SDL 1.3 . Now as I am rewriting things I am getting a SIGSGV from gdb
…TTF_Init called earlier
Declaration
Code:
font = TTF_OpenFont(“assets/fonts/mplus-1mn-regular.ttf”,12);
On Render
Code:
SDL_Color textColor = { 255, 250 , 250};
string error = TTF_GetError();
if (font != NULL){
if(!(debug_surface=TTF_RenderText_Solid(font,“Hello World!”,textColor))) {
error = TTF_GetError();
}
}
GDB OUTPUT
Code:
Program received signal SIGSEGV, Segmentation fault.
0x6f4c2c21 in TTF_RenderUNICODE_Solid () from w:\Dropbox…path…\Dev\bin\SDL_ttf.dll
(gdb) p font
$16 = (TTF_Font *) 0x57d8190
(gdb) p *font
$17 =
(gdb) p textColor
$18 = {r = 255 ‘\377’, g = 250 ‘?’, b = 250 ‘?’, unused = 0 ‘\000’
(gdb)
Thanks for any assistance - been looking at this for about and hour/hour+half