You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a function to stack SVG images together. it is
functionsvg_stack(svgs::AbstractVector)
@assert!isempty(svgs)
bg, rest = Iterators.peel(svgs)
rt =root(bg|>string|>parsexml)
for svg in rest
for c incollect(eachelement(root(svg|>string|>parsexml)))
unlink!(c)
link!(rt, c)
endendstring(rt)
end
You can think of the svg as a xml string.
When I removed the collect before the eachelement, some elements are missed. It seems that the second and subsequent elements have never been traversed due to the existence of unlink!.
When I kept the collect before the eachelement, however, a segmentation fault occurred occasionally. Like this one:
signal (11): Segmentation fault
in expression starting at /home/runner/work/WordCloud.jl/WordCloud.jl/test/runtests.jl:9
unknown function (ip: 0x7f3954feb6a7)
xmlOutputBufferWriteString__internal_alias at /workspace/srcdir/libxml2-2.9.10/xmlIO.c:3653
xmlNodeDumpOutputInternal at /workspace/srcdir/libxml2-2.9.10/xmlsave.c:1042
xmlNodeListDumpOutput at /workspace/srcdir/libxml2-2.9.10/xmlsave.c:820
xmlNodeDumpOutputInternal at /workspace/srcdir/libxml2-2.9.10/xmlsave.c:1069
xmlNodeDumpOutput__internal_alias at /workspace/srcdir/libxml2-2.9.10/xmlsave.c:2377
xmlBufNodeDump__internal_alias at /workspace/srcdir/libxml2-2.9.10/xmlsave.c:2271
xmlNodeDump__internal_alias at /workspace/srcdir/libxml2-2.9.10/xmlsave.c:2207
macro expansion at /home/runner/.julia/packages/EzXML/ZNwhK/src/error.jl:50 [inlined]
dump_node at /home/runner/.julia/packages/EzXML/ZNwhK/src/node.jl:335
print at /home/runner/.julia/packages/EzXML/ZNwhK/src/node.jl:310
print_to_string at ./strings/io.jl:135
string at ./strings/io.jl:174 [inlined]
svg_stack at /home/runner/work/WordCloud.jl/WordCloud.jl/src/svg.jl:82
Did I miss anything? What is the right way to use them? Or is this a bug?
The text was updated successfully, but these errors were encountered:
I have a function to stack SVG images together. it is
You can think of the svg as a xml string.
When I removed the
collect
before theeachelement
, some elements are missed. It seems that the second and subsequent elements have never been traversed due to the existence ofunlink!
.When I kept the
collect
before theeachelement
, however, a segmentation fault occurred occasionally. Like this one:Did I miss anything? What is the right way to use them? Or is this a bug?
The text was updated successfully, but these errors were encountered: