Bug 523002 - Unable to run Inkscape
Summary: Unable to run Inkscape
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libxml2
Version: 11
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
: 523530 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-13 09:01 UTC by Luya Tshimbalanga
Modified: 2009-10-09 03:36 UTC (History)
7 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2009-10-09 03:36:05 UTC


Attachments (Terms of Use)
error output (59.56 KB, text/plain)
2009-09-13 20:24 UTC, Jan Bušta
no flags Details
rpm -qa and strace (47.01 KB, application/x-gzip)
2009-09-13 21:46 UTC, German Pacenza
no flags Details
rpm -qa | strace (19.23 KB, application/x-lzma)
2009-09-14 01:54 UTC, Luya Tshimbalanga
no flags Details

Description Luya Tshimbalanga 2009-09-13 09:01:33 UTC
Description of problem:
inkscape will not run when trying to start due to an error of xml declaration. I am sure which package has that bug but I assumed it is Inkscape until someone reproduce it.

Version-Release number of selected component (if applicable):
0.47-0.16.pre2.20090907svn

How reproducible:
always

Steps to Reproduce:
1. run inkscape from terminal
2.
3.
  
Actual results:
Traceback

** (inkscape:15276): CRITICAL **: Inkscape::Extension::Extension* Inkscape::Extension::build_from_reprdoc(Inkscape::XML::Document*, Inkscape::Extension::Implementation::Implementation*): assertion `doc != NULL' failed

** (inkscape:15276): WARNING **: Unable to create extension from definition file /usr/share/inkscape/extensions/foldablebox.inx.

/usr/share/inkscape/extensions/handles.inx:1: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?>

Expected results:


Additional info:

Comment 1 Lubomir Rintel 2009-09-13 09:51:15 UTC
Hi Luya,

thanks for your report. I can not reproduce the issue you have described. Do you run Fedora 11? Which architecture?

Could you please run these commands (and paste eventual errors)?

$ rpm -V inkscape
$ tidy -xml /usr/share/inkscape/extensions/handles.inx >/dev/null
$ tidy -xml /usr/share/inkscape/extensions/foldablebox.inx >/dev/null

Comment 2 Luya Tshimbalanga 2009-09-13 10:26:37 UTC
Yes on i586 architecture.

(In reply to comment #1)
> Hi Luya,
> 
> thanks for your report. I can not reproduce the issue you have described. Do
> you run Fedora 11? Which architecture?

Yes on i586 architecture. 


> Could you please run these commands (and paste eventual errors)?
> 
> $ rpm -V inkscape

Return nothing

> $ tidy -xml /usr/share/inkscape/extensions/handles.inx >/dev/null
No warnings or errors were found.

> $ tidy -xml /usr/share/inkscape/extensions/foldablebox.inx >/dev/null  
No warnings or errors were found.

Comment 3 Jan Bušta 2009-09-13 20:16:33 UTC
The same problem with inkscape-0.47-0.15.pre1.20090810svn.fc11.x86_64 from updates-testing.

Comment 4 Jan Bušta 2009-09-13 20:24:40 UTC
Created attachment 360854 [details]
error output

inkscape 2> inkscape.log and after 5sec Ctrl+C

Comment 5 German Pacenza 2009-09-13 20:58:41 UTC
Same bug here. Inkscape 0.47-0.16.pre2.20090907svn.fc11 (Downloaded from koji).

Comment 6 Lubomir Rintel 2009-09-13 21:11:44 UTC
Thank you for your responses.

Could someone please attach outputs of "rpm -qa" and log file from "strace -f -o inkscape.log inkscape"?

Comment 7 German Pacenza 2009-09-13 21:46:43 UTC
Created attachment 360859 [details]
rpm -qa and strace

Comment 8 Luya Tshimbalanga 2009-09-14 01:54:28 UTC
Created attachment 360867 [details]
rpm -qa | strace

log report compressed to lzma

Comment 9 Luya Tshimbalanga 2009-09-14 06:00:14 UTC
I downgraded libxml2 to testing purpose. Inkscape will start without a problem. I think the bug is from lbixml2. Can anyone reproduce it?

Comment 10 Jan Bušta 2009-09-14 06:29:09 UTC
Which packages exactly did you downgrade?

Comment 11 Luya Tshimbalanga 2009-09-14 06:35:05 UTC
only libxml2. Be warned it removes setroubleshoot, gnome-packagekit and system-config-printer.

Comment 12 Jan Bušta 2009-09-14 06:52:42 UTC
It works, but if the x86_64 and i586 are installed, both have to be downgraded. Works with libxml2-2.7.3-3.fc11.{i586,x86_64}

Comment 13 Lubomir Rintel 2009-09-14 07:05:28 UTC
Yes, upgrading libxml2 indeed makes it possible to reproduce the problem. Daniel, I'm wondering if you recognize the problem (if it's a known issue with libxml2 or obvious bug in inkscape)?

Comment 14 Daniel Veillard 2009-09-15 15:10:44 UTC
I don't know. I don't see the XML file, provide it as an attachment
and I will able to make a diagnostic.
Note that tidy -xml is not an XML parser, or not used to. Run xmllint
on the resource to get a proper diagnostic !

Daniel

Comment 15 Daniel Veillard 2009-09-15 15:25:30 UTC
Okay I reproduced the problem, but

/usr/share/inkscape/extensions/ai_input.inx:1: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?>

those errors seems to indocate the parser is being fed by a data flow with
*something* before the start of the document.

paphio:~ -> xmllint --version
xmllint: using libxml version 20704
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib 
paphio:~ -> xmllint --noout /usr/share/inkscape/extensions/ai_output.inx
paphio:~ -> 

  the resource is correct XML, libxml2-2.7.4 parses it just fine, it's UTF-8
there is no DTD or other things which could influence parsing, so my guess is
that the regression is due to the way inkscape launches the parser and
feeds it. I don't know that code, and I have no idea what they are doing
in the parser wrapper classes but there is something funky there.

Daniel

Comment 16 Lubomir Rintel 2009-09-15 15:31:38 UTC
Thanks a lot, Daniel! I'll take a look.

Comment 17 Daniel Veillard 2009-09-15 15:59:49 UTC
The way the loader for the extension works in inkskape is rather funky
it starts with no data at all for the parser to consume, then when
the parser requests some data it feeds only 4 bytes enough to make
a pre encoding detection but not enough for detecting <?xml indicative
of the XMLDecl:

10086	xmlParseDocument(xmlParserCtxtPtr ctxt) {
(gdb) n
10090	    xmlInitParser();
(gdb) p *ctxt->input
$7 = {buf = 0x14716b0, 
  filename = 0x14bc340 "/usr/share/inkscape/extensions/printing-marks.inx", 
  directory = 0x0, base = 0x11e3440 "", cur = 0x11e3440 "", 
  end = 0x11e3440 "", length = 0, line = 1, col = 1, consumed = 0, free = 0, 
  encoding = 0x0, version = 0x0, standalone = -1, id = 65}
(gdb) n
10092	    if ((ctxt == NULL) || (ctxt->input == NULL))
(gdb) 
10095	    GROW;
(gdb) 
10100	    xmlDetectSAX2(ctxt);
(gdb) p *ctxt->input
$8 = {buf = 0x14716b0, 
  filename = 0x14bc340 "/usr/share/inkscape/extensions/printing-marks.inx", 
  directory = 0x0, base = 0x11e3440 "<?xm", cur = 0x11e3440 "<?xm", 
  end = 0x11e3444 "", length = 0, line = 1, col = 1, consumed = 0, free = 0, 
  encoding = 0x0, version = 0x0, standalone = -1, id = 65}
(gdb) n
10105	    if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
[...]
(gdb) 
10126	    if (CUR == 0) {
(gdb) 
10135	    if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5))

  I will provide a patch and work around this but the loader is
fairly strange in the first place they should just use the
xmlReadFile or something similar.

Daniel

Comment 18 Daniel Veillard 2009-09-15 16:52:23 UTC
The source of the problem

http://git.gnome.org/cgit/libxml2/commit/?id=7e385bd4e28a0cc12b6b26ed178c620e3c3ab8d8

a fix for libxml2

http://git.gnome.org/cgit/libxml2/commit/?id=9d3d141c412baa5c713ad3df48f1a4d179e07b05

I will make a new build for testing

Comment 19 Daniel Veillard 2009-09-15 17:25:55 UTC
libxml2-2.7.4-2.fc11 built in dist-f11-updates-candidate,

Daniel

Comment 20 Fedora Update System 2009-09-15 17:28:02 UTC
libxml2-2.7.4-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/libxml2-2.7.4-2.fc11

Comment 21 Fedora Update System 2009-09-15 17:29:50 UTC
libxml2-2.7.4-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/libxml2-2.7.4-2.fc10

Comment 22 Luya Tshimbalanga 2009-09-15 17:54:13 UTC
Inkscape is now running with this new version of libxml2 from i586 architecture. Thank you for fix, Daniel.

Comment 23 Lubomir Rintel 2009-09-15 21:02:05 UTC
*** Bug 523530 has been marked as a duplicate of this bug. ***

Comment 24 Jan Bušta 2009-09-15 21:05:06 UTC
The x86_64 architecture is also working well.

Comment 25 Fedora Update System 2009-09-16 20:32:53 UTC
libxml2-2.7.4-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libxml2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9668

Comment 26 Fedora Update System 2009-09-16 20:33:03 UTC
libxml2-2.7.4-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libxml2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9670

Comment 27 Horst H. von Brand 2009-09-19 03:18:05 UTC
Rawhide x86_64 here. Inkscape now works (with libxml2-2.7.4-2.fc12.x86_64).


Note You need to log in before you can comment on or make changes to this bug.