Hi,

It's always best to check the return value of any AG_SurfaceFrom*()
function for NULL (use AG_GetError() to retrieve error string). In
this case, AG_SurfaceFromJPEG() was just unimplemented.

AG_SurfaceFromJPEG() and AG_SurfaceFromPNG() have just been implemented
in SVN trunk.

On Fri, Apr 16, 2010 at 06:06:03PM -0300, Ernesto Domato wrote:
> Hi, I was trying to replace the SDL_Surface from my code by using
> AG_Surface but when I run it, it segfault (the compilation went fine)
> with this:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7b489ed in SizeRequest () from /usr/local/lib/libag_gui.so.1
> (gdb) bt
> #0  0x00007ffff7b489ed in SizeRequest () from /usr/local/lib/libag_gui.so.1
> #1  0x00007ffff7af3d09 in AG_WidgetSizeReq () from 
> /usr/local/lib/libag_gui.so.1
> #2  0x00007ffff7af8d03 in SizeAllocate () from /usr/local/lib/libag_gui.so.1
> #3  0x00007ffff7af3e06 in AG_WidgetSizeAlloc () from
> /usr/local/lib/libag_gui.so.1
> #4  0x00007ffff7af7c16 in AG_WindowSetGeometryRect () from
> /usr/local/lib/libag_gui.so.1
> #5  0x00007ffff7af8230 in AG_WindowMaximize () from
> /usr/local/lib/libag_gui.so.1
> #6  0x00000000004018bc in main (argc=1, argv=0x7fffffffe3a8) at gui.c:145
> 
> I send you the code with the commented lines that works in the main
> function by using SDL_Surface with SDL_Image library for SDL.
> 
> Thanks.
> Ernesto


> _______________________________________________
> Agar mailing list
> [email protected]
> http://libagar.org/lists.html


_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to