Tener / spike

Experimental web browser
BSD 3-Clause "New" or "Revised" License
22 stars 6 forks source link

spike: fd:11: hFlush: resource vanished (Broken pipe) #1

Closed juhp closed 7 years ago

juhp commented 12 years ago

Perhaps I am missing something obvious but if I try to run spike on Fedora 16 I get:

~/haskell/spike:master$ spike 
"CALL: viewPage"
"CALL: refreshLayout"
"strange stuff."
"digraph \"Browse tree\" {\ngraph [\nfontname = \"Helvetica-Oblique\",\npage = 10\nsize = 30\n ];\nd0 [URL=\"page://0\", shape=polygon, fixedsize=true, fontsize=8, width=1.25, height=0.25, tooltip=\"https://google.com\", label=\"https://google.com...\"];\nd1 [URL=\"page://1\", shape=polygon, fixedsize=true, fontsize=8, width=1.25, height=0.25, tooltip=\"http://news.google.com\", label=\"http://news.google...\"];\n}"
[]
spike: fd:11: hFlush: resource vanished (Broken pipe)
Tener commented 12 years ago

Do you have 'dot' command from Graphviz suite installed? I think it's trying to execute it and doesn't find it. But I might be wrong here - if this is not the case please do 'strace spike' and send the results.

juhp commented 12 years ago

Doh - right you are. Thanks that gets me running.

Perhaps I am missing something else too. The spike tree browser graph is not rendering for me:

This page contains the following errors:

error on line 21 at column 1: Encoding error
Below is a rendering of the page up to the first error.
Tener commented 12 years ago

The svg produced by dot must be somehow wrong or it doesn't produce any output. Try to run spike from console and look at standard output. It should print both input for dot and output received (with error codes and such).

juhp commented 12 years ago

"digraph \"Browse tree\" {\ngraph [\nfontname = \"Helvetica-Oblique\",\npage = 10\nsize = 30\n ];\nd0 [URL=\"page://0\", shape=polygon, fixedsize=true, fontsize=8, width=1.25, height=0.25, tooltip=\"https://google.com\", label=\"https://google.com...\"];\nd1 [URL=\"page://1\", shape=polygon, fixedsize=true, fontsize=8, width=1.25, height=0.25, tooltip=\"http://news.google.com\", label=\"http://news.google...\"];\n}"

juhp commented 12 years ago

Seems the output is too long to paste here:

(ExitSuccess,"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n\n\n<svg width=\"206pt\" height=\"26pt\"\n viewBox=\"0.00 0.00 206.00 26.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 22)\">\nBrowse tree\n<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-22 203,-22 203,5 -4,5\"/>\n\n<g id=\"node1\" class=\"node\">d0\n<a xlink:href=\"page://0\" xlink:title=\"https://google.com\">\n<polygon fill=\"none\" stroke=\"black\" points=\"90,-18 0,-18 0,-0 90,-0 90,-18\"/>\n<text text-anchor=\"middle\" x=\"45\" y=\"-7.1\" font-family=\"Times,serif\" font-size=\"8.00\">https://google.com...\n\n\n\n<g id=\"node2\" class=\"node\">d1\n<a xlink:href=\"page://1\" xlink:title=\"http://news.google.com\">\n<polygon fill=\"none\" stroke=\"black\" points=\"198,-18 108,-18 108,-0 198,-0 198,-18\"/>\n<text text-anchor=\"middle\" x=\"153\" y=\"-7.1\" font-family=\"Times,serif\" font-size=\"8.00\">http://news.google...\n\n\n\n\n","") "CALL: refreshLayout"

juhp commented 12 years ago

Anyway, any plans to move move away from calling out to graphviz?

Tener commented 12 years ago

This is doable, for example svg can be rendered with this package: http://hackage.haskell.org/package/yjsvg I'll make an issue on issue tracker from it later.

I have no idea though where the error comes from: there is nothing suspicious on line 20 or anything near it.