toxic SVG for dumpAsText() in Layout-TNG-Output.cpp
While debugging I found that the dumpAsText() method is sensitive to some legal, but not very useful SVG constructs. Constructs Inkscape created for some reason or other. For instance, this:
<text xml:space="preserve"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:FreeSans;-inkscape-font-specification:Sans Bold" x="929.79449" y="173.63014" id="text3112" sodipodi:linespacing="125%" transform="translate(0,377.35975)"><tspan sodipodi:role="line" id="tspan3114" x="929.79449" y="173.63014" /><tspan sodipodi:role="line" id="tspan3126" x="929.79449" y="193.63014" /></text>
blows up in dumpAsText, if that is method is included in the code for debugging purposes. The problem is that for the empty spans the "input_stream_first_character" iterator on the empty spans cannot be dereferenced without a segfault, and that is exactly what happens here:
snprintf(line, sizeof(line), " %d: '%c' 0x%4.4x x=%f flags=%03x glyph=%d\n", char_index, *iter_char, *iter_char, _characters[char_index].x, *u.uattr, _characters[char_index].in_glyph);
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
participants (1)
-
mathog