Re: frequently updated pixbuf images disapear after a while



the g_sprintf returns the number of characters, so i should use it like the
normal sprintf,
gchar *mapper_chk_cmd;
g_sprintf(mapper_chk_cmd, "/dev/mapper/%s", data);

but it doesnt seem to help, the segfault is there, too

when i init it with gchar mount_chk_cmd[128]; i can use it like
with sprintf, but i cant free the memory for these gchars.

I got the warning with the g_sprintf, but i think it was because it returned
int

i removed the fclose and pclose, but the app also crashed after a while with
the same
symptoms.

On 8/27/06, Peter Firefly Lund <firefly diku dk> wrote:

On Sun, 27 Aug 2006, rupert wrote:

> mh, i noticed that, but when i the fclose in the line before return TRUE
i
get a segfault.

You are papering over another fault.  Find that and fix it instead.

It might be that sprintf() creates a string that is too big for the buffer
you allocated.  Such things can be quite unhealthy, which is why one
should use g_sprintf() instead.

-Peter




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