From: "Young, Robert" <Robert Young dsto defence gov au>
To: "'dia-list gnome org'" <dia-list gnome org>
Subject: RE: RE: StdProp overhaul, take 2
Date: Wed, 15 Aug 2001 17:41:08 +0930
> > Core dump after copying and pasting a flowchart object with
> text in it (test
> > file not required - just create flowchart box, type some
> text, copy (CTRL-C)
> > then paste (CTRL-V) - core dump happens). gdb gave me this
> from a gdb
> > ./app/dia -core core
> > #0 0x808a7d0 in font_get_cache (font=0x8064e98, height=0)
> at font.c:912
> > 912 } else if (font->cache[index]->height != height) {
>
> > This doesn't happen in 0.88.1
>
> Indeed, it's from new code. I just found the problem and nailed it
> (hopefully). Basically, a (Text *) field was handled as a
> string property,
> and that text field was described by a common property
> descriptor named...
> PROP_TYPE_STD_TEXT. The property offset descriptor correctly
> referred to
> that property as a Text property ; I've added a safety net
> and corrected the
> STD_TEXT definition (the objects were already expecting this
> definition
> anyway).
The patch worked OK (I'm a bit new to this patch thing, but that's what man
is for :-) but there's now another problem (with the new patched dia),
possibly related:
Create new diagram, place a custom shape (e.g. resistor from Circuit sheet),
select modify tool. Copy. Dia segfaults, and gdb gives:
Program terminated with signal 11, Segmentation fault.
#0 text_get_attributes (text=0x0, attr=0x81cd854) at text.c:939
939 attr->font = text->font;
This doesn't happen if the object has text associated with it, e.g. Computer
from the Network sheet.
Hope this helps.
Regards,
Rob.