[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphviz-interest
Subject:    Re: [graphviz-interest] WebDot Error: Could not set character size
From:       Ryan Schmidt <graphviz-2009a () ryandesign ! com>
Date:       2009-02-16 4:29:08
Message-ID: 85E56BF9-C578-4FD7-907B-EAEDBDA1E236 () ryandesign ! com
[Download RAW message or body]


On Feb 15, 2009, at 09:05, John Ellson wrote:

> From the command line, can you do a simple tcldot exercise?
>
>    $ tclsh
>    % package require Tcldot
>    % set g [dotnew digraph]
>    % [$g addnode] addedge [$g addnode]
>    % $g write stdout svg

That looks ok.


$ tclsh
% package require Tcldot
2.21.20090209.0545
% set g [dotnew digraph]
graph0
% [$g addnode] addedge [$g addnode]
edge0
% $g write stdout svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by tcldot version 2.21.20090209.0545 (20090209.0545)
      For user: (rschmidt) Ryan Schmidt -->
<!-- Title: graph0 Pages: 1 -->
<svg width="62pt" height="116pt"
  viewBox="0.00 0.00 62.00 116.00" xmlns="http://www.w3.org/2000/svg"  
xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate 
(4 112)">
<title>graph0</title>
<polygon fill="white" stroke="white" points="-4,5 -4,-112 59,-112  
59,5 -4,5"/>
<!-- node0 -->
<g id="node1" class="node"><title>node0</title>
<ellipse fill="none" stroke="black" cx="27" cy="-90" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-84.1" font-family="Times New  
Roman,serif" font-size="14.00">node0</text>
</g>
<!-- node1 -->
<g id="node2" class="node"><title>node1</title>
<ellipse fill="none" stroke="black" cx="27" cy="-18" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-12.1" font-family="Times New  
Roman,serif" font-size="14.00">node1</text>
</g>
<!-- node0&#45;&gt;node1 -->
<g id="edge1" class="edge"><title>node0&#45;&gt;node1</title>
<path fill="none" stroke="black" d="M27,-71.8314C27,-64.131  
27,-54.9743 27,-46.4166"/>
<polygon fill="black" stroke="black" points="30.5001,-46.4132  
27,-36.4133 23.5001,-46.4133 30.5001,-46.4132"/>
</g>
</g>
</svg>
%


If I change "$g write stdout svg" to "$g write stdout png" it  
produces a png -- with antialiasing, so that must be pango/cairo.


> I'm trying to get a new webdot server up myself, on fedora.  I'm  
> running into problems with selinux.
> Does Mac have anything similar that might be restricting access?

Mac OS X 10.4 introduced ACLs but I'm not using them.


> In webdot's  CVS sources there is a file called scaffold.tcl.     
> You can customise this and run it from the command line.   It sets  
> up a fake cgi
> environment as expected by webdot and allows you to debug the  
> script independently of your web server.
> Just be sure to rm -rf /var/cache/webdot/* afterwards.   When  
> webdot is run from the webserver, the cache contents must be owned  
> by the web server's userid.  e.g. "apache:apache"

That should be helpful. But it still says "Could not set character  
size" -- interestingly, even if I use a graph that has no characters  
in it.

digraph G {
	a [label=""]
}

If I comment out the line "set SIGNATURE "Graph by WebDot"" then it  
works, both on the command line via scaffold.tcl and as a cgi via the  
browser. So the character size it could not set was for the  
signature, not for anything in the graph. But in both cases, the  
graph drawing is aliased, so not with pango/cairo.


> I think there are problems with dot, xdot, plain outputs from  
> Tcldot at the moment.     Its a complicated issue - but basically I  
> need to be able to replace the
> output routine in libgraph with something compatible with Tcl's  
> channels.     I was hoping to use the facilities of cgraph for  
> this, but cgraph is held up because of other issues.
>>

If I try your test script above with "$g write stdout dot" or "$g  
write stdout xdot" I get a bus error:


2009-02-15 18:37:11 -0600

EXC_BAD_ACCESS (0x0001)
KERN_PROTECTION_FAILURE (0x0002) at 0x00000039

Thread 0 Crashed:
0    fwrite + 77
1    write_dict + 235
2    agwrite + 205
3    dot_end_graph + 99
4    gvrender_end_graph + 29
5    emit_graph + 2822
6    gvRenderJobs + 6133
7    graphcmd + 3274
8    TclInvokeStringCommand + 79
9    TclEvalObjvInternal + 1537


With "$g write stdout plain" I get:


2009-02-15 18:37:37 -0600

EXC_BAD_ACCESS (0x0001)
KERN_PROTECTION_FAILURE (0x0002) at 0x00000039

Thread 0 Crashed:
0    fwrite + 77
1    write_plain + 697
2    dot_end_graph + 449
3    gvrender_end_graph + 29
4    emit_graph + 2822
5    gvRenderJobs + 6133
6    graphcmd + 3274
7    TclInvokeStringCommand + 79
8    TclEvalObjvInternal + 1537
9    TclEvalEx + 658


_______________________________________________
graphviz-interest@research.att.com
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic