[Freeassociation-devel] icalcomponent_as_ical_string

Philippe Roussel p.o.roussel at free.fr
Fri Sep 4 08:30:04 PDT 2009


[Wrong mailing list, try again...]

Hi all,

I'm having strange crashes in icalcomponent_as_ical_string (with 0.43
and others).

My application is reading files with icalparser_parse_string and
writing them with icalcomponent_as_ical_string. If I write the file
just after parsing it everything works fine so it must be something I
do with the icalcomponent.

To test that I'm using icalcomponent_is_valid after each modification
but it always returns 1.

Backtraces look like the following :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220897088 (LWP 16579)]
0xb77b32a3 in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb77b32a3 in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0xb77b2fe5 in strdup () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7fb058c in icalmemory_strdup (s=0x0) at icalmemory.c:244
#3  0xb7fa8cc8 in icalproperty_enum_to_string_r (e=0) at icalderivedproperty.c:3136
#4  0xb7fbe90a in icalvalue_as_ical_string_r (value=0x0) at icalvalue.c:1185
#5  0xb7fb33ef in icalproperty_as_ical_string_r (prop=0x8451ae8) at icalproperty.c:501
#6  0xb7fabc5a in icalcomponent_as_ical_string_r (impl=0x8672ee0) at icalcomponent.c:342
#7  0xb7fabcb3 in icalcomponent_as_ical_string_r (impl=0x84e0bb0) at icalcomponent.c:355
#8  0xb7fabde1 in icalcomponent_as_ical_string (impl=0x0) at icalcomponent.c:292
#9  0x080652e1 in -[iCalTree iCalTreeAsString] (self=0x84c50e8, _cmd=0x8084118) at iCalTree.m:60

and sure enough strdup is called with NULL but I can't find why.

Any hint ? Does icalcomponent_is_valid really validates the component ?

Philippe
-- 
Sans le kangourou, l'homme n'aurait jamais su qu'il ne possede pas de poche marsupiale. Alexandre Vialatte




More information about the libical-devel mailing list