[SDL] SFL_TTF Seg fault on simple test

Machuse m24designs at gmail.com
Sun Jul 31 00:42:29 PDT 2011


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 = <incomplete type>
(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




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110731/342c1448/attachment-0007.htm>


More information about the SDL mailing list