Subject: [xml2rfc] #187: Crash as detailed below

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 10 Jul 2013 21:23:24 -0000

#187: Crash as detailed below

 Traceback from running online version 2.4.2.

 The attached file generates the traceback below.  It clearly has a few
 issues with long lines but generates output OK with the old version (1.36)
 - I have attached the 1.36 output as well.

 Warnings exist
 Generating Text output in ASCII format
 Expanding internal references and generating Text

 Using
 XML_LIBRARY=/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml2:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml4:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml5
 Parsing file INPUT
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc/templates/rfc2629.dtd
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc/templates/rfc2629-xhtml.ent
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc/templates/rfc2629-other.ent
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc/templates/rfc2629.dtd
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc/templates/rfc2629-xhtml.ent
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc/templates/rfc2629-other.ent
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.2119.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.3031.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.5036.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.5561.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.6348.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.6388.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml/reference.RFC.6512.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D
 .ietf-mpls-ldp-multi-topology.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D
 .wijnands-mpls-mldp-node-protection.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D
 .ietf-rtgwg-mrt-frr-architecture.xml
 Resolving include...
 /home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3/reference.I-D
 .enyedi-rtgwg-mrt-frr-algorithm.xml

 WARNING: Output line (from source around line 297) is 75 characters;
 longer than 72.  Excess characters: 'SR)':
   '                          |    R4     |      |    R5     | (Downstream
 LSR)'

 WARNING: Output line (from source around line 513) is 75 characters;
 longer than 72.  Excess characters: 'SR)':
   '                          |    R4     |      |    R5     | (Downstream
 LSR)'

 WARNING: Output line (from source around line 598) is 73 characters;
 longer than 72.  Excess characters: '1':
   '          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
 1'

 WARNING: Output line (from source around line 599) is 75 characters;
 longer than 72.  Excess characters: '+-+':
   '
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

 WARNING: Output line (from source around line 600) is 75 characters;
 longer than 72.  Excess characters: '  |':
   '          |1|0| mLDP Based MP Prot.(IANA) |          Length (= 2)
 |'

 WARNING: Output line (from source around line 601) is 75 characters;
 longer than 72.  Excess characters: '+-+':
   '
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

 WARNING: Output line (from source around line 633) is 74 characters;
 longer than 72.  Excess characters: ' 1':
   '           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
 0 1'

 WARNING: Output line (from source around line 634) is 75 characters;
 longer than 72.  Excess characters: '+-+':
   '
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

 WARNING: Output line (from source around line 635) is 75 characters;
 longer than 72.  Excess characters: '  |':
   '          |mLDP FRR Type=3|      Length                   |   Reserved
 |'

 WARNING: Output line (from source around line 636) is 75 characters;
 longer than 72.  Excess characters: '+-+':
   '
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

 WARNING: Output line (from source around line 637) is 75 characters;
 longer than 72.  Excess characters: '  ~':
   '          ~                    PLR Node Address
 ~'

 WARNING: Output line (from source around line 638) is 75 characters;
 longer than 72.  Excess characters: '+-+':
   '
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'

 WARNING: Output line (from source around line 688) is 75 characters;
 longer than 72.  Excess characters: ' 9;':
   '      Length:  If the Address Family is IPv4, the Address Length MUST
 be 9;'

 WARNING: Output line (from source around line 689) is 76 characters;
 longer than 72.  Excess characters: ' 33.':
   '               if the Address Family is IPv6, the Address Length MUST
 be 33.'

 WARNING: Output line (from source around line 702) is 83 characters;
 longer than 72.  Excess characters: 'ic's on PLR':
   '      N Bit: Node Failure Required Flag, the occasion of switching
 traffic's on PLR'

 WARNING: Output line (from source around line 703) is 91 characters;
 longer than 72.  Excess characters: 'ts the node failure':
   '              1 = 'Y', switch traffic to backup path only when PLR
 detects the node failure'

 WARNING: Output line (from source around line 704) is 77 characters;
 longer than 72.  Excess characters: 'ilure':
   '              0 = 'N', switch traffic to backup path when PLR detects
 failure'

 WARNING: Output line (from source around line 712) is 97 characters;
 longer than 72.  Excess characters: ' definition in [RFC6388].':
   '   Opaque Value: One or more MP opaque value elements, which is the
 same definition in [RFC6388].'

 WARNING: Output line (from source around line 713) is 79 characters;
 longer than 72.  Excess characters: 'encoded':
   '                 For the FRR mLDP FEC element, the Opaque Value MUST be
 encoded'

 WARNING: Output line (from source around line 714) is 88 characters;
 longer than 72.  Excess characters: '6512]. The value':
   '                 as the Recursive Opaque Value, which is defined in
 [RFC6512]. The value'

 WARNING: Output line (from source around line 715) is 82 characters;
 longer than 72.  Excess characters: 'al primary':
   '                 fields of the Recursive Opaque Value contain the
 original primary'

 WARNING: Output line (from source around line 722) is 96 characters;
 longer than 72.  Excess characters: '], is shown in Figure 5.':
   '    The encoding for this Recursive Opaque Value, as defined in
 [RFC6512], is shown in Figure 5.'

 Traceback (most recent call last):
   File "/usr/local/bin/xml2rfc", line 224, in <module>
     main()
   File "/usr/local/bin/xml2rfc", line 209, in main
     pagedwriter.write(filename)
   File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/base.py",
 line 1088, in write
     self.post_rendering()
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc/writers/paginated_txt.py", line 286, in post_rendering
     self.emit([''] * remainder)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc/writers/paginated_txt.py", line 164, in emit
     if self.page_length == 1 and text.strip() == '':
 AttributeError: 'list' object has no attribute 'strip'

-- 
-----------------------------------+--------------------------
 Reporter:  [email-masked]  |      Owner:  Elwyn Davies
     Type:  defect                 |     Status:  new
 Priority:  major                  |  Milestone:
Component:  Version 2 cli          |    Version:  2.4.x
 Keywords:  crash output           |
-----------------------------------+--------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/187>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 10 Jul 2013 22:39:27 -0000

Comment (by [email-masked]):

 I have now edited this document to remove the overlong lines and the tab
 characters in the figures.

 This has fixed the crash.

 The revised doc is also attached.

 Elwyn.

-- 
------------------------------------+--------------------------
  Reporter:  [email-masked]  |      Owner:  Elwyn Davies
      Type:  defect                 |     Status:  new
  Priority:  major                  |  Milestone:
 Component:  Version 2 cli          |    Version:  2.4.x
Resolution:                         |   Keywords:  crash output
------------------------------------+--------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/187#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Fri, 26 Jul 2013 17:42:41 -0000

Comment (by [email-masked]):

 The RPC has gotten this error as well. Also, R. Raymond reported it on the
 list 24 July ([xml2rfc] bug in XML2RFC AttributeError: 'list' object has
 no attribute 'strip').

 The last lines of Elwyn's report are the same as the error we get (except
 it's python 2.6 on our system):
 {{{
 File "/usr/local/lib/python2.7/dist-packages/xml2rfc/writers/base.py",
 line 1088, in write
 self.post_rendering()
 File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc/writers/paginated_txt.py", line 286, in post_rendering
 self.emit([] * remainder)

 File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc/writers/paginated_txt.py", line 164, in emit
 if self.page_length == 1 and text.strip() == :

 AttributeError?: 'list' object has no attribute 'strip'
 }}}

 It seems to be:
   * corrected by removing a line in artwork that is over 72 chars.
   * intermittent. i.e., not always re-creatable w/ the same file.

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/187#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>