Re: desktop.links entries - was Re: Advocacy report [part 2]



> 
> int main (int argc, char *argv)

this should be:

int main (int argc, char *argv[])

Which should get rid of the segfault.

> {
>    if (argc != 3){
>       fprintf (stderr, "Usage: set-icon filename icon-filename");
>       exit (1);
>    }
>    set_icon (argv [1], argv [2]);
> }
> -----------------------------------------
> 
> So now it compiles however when I try it, it segfaults - gdb gives
> 
> (gdb) run $HOME/.gnome-desktop/floppy /usr/share/pixmaps/mc/i-floppy.png
> The program being debugged has been started already.
> Start it from the beginning? (y or n) y
> Starting program: /maths/students/pgc/compsys/progs/set-icon
> $HOME/.gnome-desktop/floppy /usr/share/pixmaps/mc/i-floppy.png
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x400fa027 in strlen (str=0xffffffff <Address 0xffffffff out of bounds>)
>     at ../sysdeps/i386/strlen.c:27
> ../sysdeps/i386/strlen.c:27: No such file or directory.
> 
> Strace in attached file,
> 
> Paul
> 
> 
> 
> 
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]