After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744368 - gtkdoc-depscan doesn't handle unicode in .devhelp2 files correctly
gtkdoc-depscan doesn't handle unicode in .devhelp2 files correctly
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.22
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-12 00:58 UTC by Matthias Clasen
Modified: 2015-04-27 07:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2015-02-12 00:58:42 UTC
Reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1090204

The latest update of gtk3 breaks gtkdoc-depscan for gtk3 and gdk3 devhelp books.  This seems to be caused by property descriptions

<keyword type="property" name="The &quot;default-display&quot; property" link="GdkDisplayManager.html#GdkDisplayManager--default-display"/>

changed to

<keyword type="property" name="The “default-display” property" link="GdkDisplayManager.html#GdkDisplayManager--default-display"/>

in .devhelp2 files.  Note the different representation of quotes (entities vs Unicode).


Version-Release number of selected component (if applicable):
gtk3-devel-docs-0:3.10.8-1.fc20


How reproducible:
Always.


Steps to Reproduce:
1. Create a C program bug.c with the following content:

void bug(void);

2. Run

gtkdoc-depscan -b gtk3 bug.c


Actual results:
It crashes with
Traceback (most recent call last):
  • File "/usr/bin/gtkdoc-depscan", line 351 in <module>
    symbols.update(book.symbols)
  • File "/usr/bin/gtkdoc-depscan", line 87 in _get_symbols
    self.parse(); return self.__symbols
  • File "/usr/bin/gtkdoc-depscan", line 82 in parse
    parser.parse(open(self.__catalog))
  • File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107 in parse
    xmlreader.IncrementalParser.parse(self, source)
  • File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123 in parse
    self.feed(buffer)
  • File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 210 in feed
    self._parser.Parse(data, isFinal)
  • File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 304 in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  • File "/usr/bin/gtkdoc-depscan", line 67 in startElement
    symbol = Symbol.from_xml(self.__book, attrs)
  • File "/usr/bin/gtkdoc-depscan", line 201 in from_xml
    type, name = 'property', '%s::%s' % (owner, name.split('"')[1])
IndexError: list index out of range

Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2015-04-27 07:37:25 UTC
commit 81f84f34ebba943ace36637dbf196a846a176348
Author: Stefan Sauer <ensonic@users.sf.net>
Date:   Mon Apr 27 09:33:58 2015 +0200

    depscan: handle unicode quotation marks
    
    Convert unicode quotation marks to their ascii counterpart so that splitting
    etc. works.
    
    Fixes: #744368