[Iup-users] IupLoadImage causing Seg Fault for me
Antonio Scuri
scuri at tecgraf.puc-rio.br
Wed Oct 10 12:25:04 GMT+3 2007
IupLoadImage returns an image, that is a resource not a control.
You must add a control like label or button, then associate the image to
the control. Can use for instance:
IupSetAttributeHandle(label, "IMAGE", IupLoadImage ("support/logo.png"));
This will run even if IupLoadImage fails.
Best,
scuri
> -----Original Message-----
> From: iup-users-bounces at lists.luaforge.net
> [mailto:iup-users-bounces at lists.luaforge.net] On Behalf Of
> Jeremy Cowgar
> Sent: quarta-feira, 10 de outubro de 2007 12:13
> To: IUP discussion list.
> Subject: [Iup-users] IupLoadImage causing Seg Fault for me
>
> I have:
>
> Ihandle *box = IupVbox (
> IupLoadImage ("support/logo.png"),
> IupLabel (version),
> NULL);
> Ihandle *dlg = IupDialog (box);
> IupShow (dlg);
>
> The above is what causes the seg fault below. However, before
> we get there... If I simply comment out IupLoadImage, so that
> my dialog only contains the version number, then all works
> fine. Put IupLoadImage back in and I then have the seg fault:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1217870128 (LWP 26236)]
> 0xb7cc2663 in XtIsSubclass () from /usr/lib/libXt.so.6
> (gdb) bt
> #0 0xb7cc2663 in XtIsSubclass () from /usr/lib/libXt.so.6
> #1 0xb7ad440d in set_cursor () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #2 0xb7ad312b in iupdrvSetAttribute () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #3 0xb7ad31b8 in iupdrvSetAttribute () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #4 0xb7ad31b8 in iupdrvSetAttribute () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #5 0xb7ace41d in IupMap () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #6 0xb7ace658 in IupShowXY () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #7 0xb7ace71b in IupShow () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #8 0x08049c8b in abt_Show ()
> #9 0x08049827 in g_OnMenuHelpAbout ()
> #10 0xb7ad07cd in iupmotCallMenu () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #11 0xb7acdd0e in motLoopStep () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #12 0xb7acdd60 in IupMainLoop () from
> /home/jeremy/Projects/TecTools/lib/libiup.so
> #13 0x0804aaf1 in CiupMainLoop ()
> #14 0x08049bfc in main ()
>
>
> Any thoughts?
>
> Jeremy
>
>
> _______________________________________________
> iup-users mailing list
> iup-users at lists.luaforge.net
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>
More information about the iup-users
mailing list