Re: glib function



"Chiara Zaniboni" <zaniboni promet8 deis unibo it> writes:

> I've just used yhe glib function g_strsplit that returns a gchar
> **string. The returned array of strings must be deallocate by the
> glib function g_strfreev but when I try to do that I obtain a
> segmentation fault.  Someone can tell me if I'm doing some mistake?
> or maybe it's a bug of the function?

This routine is used in many, many places, so it's unlikely
to be a problem in GLib.

Any time you get a segfault on a free, it may be caused by
memory corruption elsewhere. If you are using Linux, doing
'export MALLOC_CHECK_=2' before running your program may
help get it to die closer to the problem.

It's also possible you are using g_strsplit() somehow incorrectly,
but you'd need to supply some example code if you wanted
us to figure out what you might be doing wrong. :-)

Regards,
                                        Owen




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