faustedition / faust-gen

Site generation for the Faustedition
http://beta.faustedition.net/
3 stars 0 forks source link

<choice> causes logged error when trying to render second alternative #17

Open thvitt opened 8 years ago

thvitt commented 8 years ago

PhantomJS reproducably crashes on the following 12 pages on the build3 machine for 211b06a99513bf95a1a7f9c654319283baa2d20f

SEVERE: Conversion of the following 12 pages failed:
 faust://xml/document/gedichte/gsa_390186.xml page 1: faust://xml/transcript/gsa/390186/0002.xml
 faust://xml/document/gedichte/gsa_390162.xml page 1: faust://xml/transcript/gsa/390162/0002.xml
 faust://xml/document/faust/2.2/gsa_391437.xml page 8: faust://xml/transcript/gsa/391437/0008.xml
 faust://xml/document/faust/2.2/gsa_390208.xml page 2: faust://xml/transcript/gsa/390208/0004.xml
 faust://xml/document/faust/2.2/gsa_390357.xml page 2: faust://xml/transcript/gsa/390357/0004.xml
 faust://xml/document/faust/2.4/gsa_390017.xml page 1: faust://xml/transcript/gsa/390017/0002.xml
 faust://xml/document/faust/2.1/gsa_390434.xml page 1: faust://xml/transcript/gsa/390434/0002.xml
 faust://xml/document/faust/2.1/gsa_391152.xml page 1: faust://xml/transcript/gsa/391152/0003.xml
 faust://xml/document/faust/2.1/gsa_390871.xml page 1: faust://xml/transcript/gsa/390871/0002.xml
 faust://xml/document/faust/2.3/gsa_390493.xml page 1: faust://xml/transcript/gsa/390493/0002.xml
 faust://xml/document/faust/2.3/gsa_391463.xml page 1: faust://xml/transcript/gsa/391463/0003.xml
 faust://xml/document/archival/gsa/GSA_25-W_477.xml page 1: faust://xml/transcript/gsa/GSA_25-W_477/0001.xml
thvitt commented 8 years ago

Seems to be machine related. When building on build2, only one document fails:

SEVERE: Conversion of the following 1 pages failed:
 faust://xml/document/faust/2.3/gsa_390493.xml page 1: faust://xml/transcript/gsa/390493/0002.xml
gerritbruening commented 8 years ago

Page 1 XML (0002.xml) seems normal to me.

thvitt commented 8 years ago

Using SlimerJS (Firefox-based PhantomJS drop-in replacement) the same kind of intermittent problem occur. There are even more crashes (~ 17) at slightly different documents.

With SlimerJS, the errors appear as Gecko Errors (i.e. onerror events) with the meaningful message Error. The issues always occur with the same stack trace:

ENGINE ERROR: Error: string [object Arguments] at js-gen/transcript-svg.js:426 at js-gen/transcript-svg.js:221 at js-gen/transcript-svg.js:221 at js-gen/transcript.js:86 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:245 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript.js:80 at js-gen/transcript.js:78 at js-gen/transcript-generation.js:58 at js-gen/transcript-generation.js:76 at js-gen/transcript-generation.js:150

ie in a call to

var textBBox = this.text.textElement.getBBox();
thvitt commented 8 years ago

after 0e24f74 the respective pages no longer crash in SlimerJS. Looking at the debug view of one of those pages shows an NS_ERROR_FAILURE → it is probably Firefox issue 612118. The pages are generated, though.

thvitt commented 8 years ago

the instances that I just looked into were expans within a choice, e.g. allenfalls in this fragment:

                <ge:line xml:id="lo">überſchwenglichem Gut<ge:rewrite hand="#g_t">em</ge:rewrite> noch nicht erholt <f:st hand="#g_bl">hatte, die <choice>
                            <abbr>allenf.</abbr>
                            <expan>allenfalls</expan>
                        </choice> Verg<orig>u</orig>nſtigung</f:st></ge:line>

(from 2 I H.57 p.1)

thvitt commented 5 years ago

The following cases exist. All pages are actually rendered, we only get an error about the second choice (which isn’t shown).

Seite Dokumentarisches Transkript problematischer Text
2 I H.17 page 2 faust://xml/transcript/gsa/389889/0003.xml Euphorion
2 I H.5 page 2 faust://xml/transcript/gsa/391152/0002.xml künſtlich verdienstlich
2 I H.7 page 1 faust://xml/transcript/gsa/391393/0003.xml ſs
2 I H.57 page 1 faust://xml/transcript/gsa/391320/0002.xml allenfalls
2 I H.11 page 2 faust://xml/transcript/gsa/390354/0003.xml ſp
2 IV H.18 page 3 faust://xml/transcript/gsa/391325/0009.xml Oberfeldherr
2 I H.56 page 10 faust://xml/transcript/gsa/391007/0009.xml mich

The Firefox message is always similar to Error in LineDecoration.Layout: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:35239/js-gen/transcript-svg.js :: FaustTranscript.LineDecoration.prototype.layout :: line 457" data: no] Euphorion (from FaustTranscript.LineDecoration.prototype.layout, line #464 in "http://localhost:35239/js-gen/transcript-svg.js")