Inkscape crashes when I search the Open Clip Art Library

Bug #989257 reported by Matt Lee
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned
inkscape (Debian)
Fix Released
Unknown

Bug Description

I've seen other bugs that report this, some suggest installing libgnomevfs2-extra -- I have it. Others talk about openclipart.org being offline -- It isn't.

This is what I see when I open Inkscape 0.4.8 on Trisquel 5.5 (GNOME 3 Fallback) and search for 'pony' in the Open Clip Art Library:

(gdb) run
Starting program: /usr/bin/inkscape
[Thread debugging using libthread_db enabled]
Gtk-Message: Failed to load module "canberra-gtk-module"

Program received signal SIGSEGV, Segmentation fault.
0x00000000009d8214 in Inkscape::UI::Dialog::FileImportFromOCALDialog::print_xml_element_names(_xmlNode*) ()
(gdb) bt
#0 0x00000000009d8214 in Inkscape::UI::Dialog::FileImportFromOCALDialog::print_xml_element_names(_xmlNode*) ()
#1 0x00000000009d8634 in Inkscape::UI::Dialog::FileImportFromOCALDialog::searchTagEntryChangedCallback() ()
#2 0x00007ffff6ea3b08 in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*) () from /usr/lib/libglibmm-2.4.so.1
#3 0x00007ffff47370a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4 0x00007ffff47491f5 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5 0x00007ffff47526b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6 0x00007ffff4752852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7 0x00007ffff5ce7905 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8 0x00007ffff47370a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9 0x00007ffff474881a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff47526b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff4752852 in g_signal_emit ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff5ce672d in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#13 0x00007ffff5d90828 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007ffff4736ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff4748e5f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff4752483 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff4752852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff5eaadc1 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x00007ffff5d8ea23 in gtk_propagate_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x00007ffff5d8ed83 in gtk_main_do_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x00007ffff5a0209c in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#22 0x00007ffff4476a5d in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#23 0x00007ffff4477258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff4477792 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff5d151bb in gtk_dialog_run ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#26 0x00000000009d89c4 in Inkscape::UI::Dialog::FileImportFromOCALDialog::show() ()
#27 0x000000000066d0c8 in sp_file_import_from_ocal(Gtk::Window&) ()
#28 0x000000000080bbd2 in sp_action_perform(SPAction*, void*) ()
#29 0x00007ffff47370a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff474902a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff47526b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007ffff4752852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#33 0x00007ffff5ea9fbe in gtk_widget_activate ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#34 0x00007ffff5da4afd in gtk_menu_shell_activate_item ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#35 0x00007ffff5da4e95 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#36 0x00007ffff5d90828 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#37 0x00007ffff47370a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#38 0x00007ffff4748e5f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#39 0x00007ffff4752483 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#40 0x00007ffff4752852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#41 0x00007ffff5eaadc1 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#42 0x00007ffff5d8ea23 in gtk_propagate_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#43 0x00007ffff5d8ed83 in gtk_main_do_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#44 0x00007ffff5a0209c in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#45 0x00007ffff4476a5d in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff4477258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007ffff4477792 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#48 0x00007ffff5d8ddb7 in gtk_main ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#49 0x000000000065ca00 in sp_main_gui(int, char const**) ()
#50 0x0000000000641e98 in main ()
(gdb)

HTH

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48.2 and 0.48.3 on OS X 10.7.2 (64bit)
Date: Fri Apr 27 01:55:37 CEST 2012

This must be due to a change in the RSS feed from openclipart: the search worked without crashing Inkscape 0.48.x just a a week ago (2012-04-20 according to irc log). Tonight, inkscape crashes when searching with 'pony' as well as with my standard search term when testing import from openclipart for reported issues ("apple").

tags: added: crash openclipart
Revision history for this message
su_v (suv-lp) wrote :

@JazzyNico - any chance you could test with the new dialog in current trunk?

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Crash report for Inkscape 0.48.3.1 OS X 10.7.2 (64bit)

Revision history for this message
su_v (suv-lp) wrote :

> This must be due to a change in the RSS feed from openclipart: (…)

OpenCLipart seems to produce invalid feeds:
 Bug #988844 “Feeds are no longer valid”
 <https://bugs.launchpad.net/openclipart/+bug/988844>

Inkscape of course should not crash even when the feed is invalid - this report is closely related or a duplicate of the earlier ones, like e.g.
 Bug #889421 “Segfault in openclipart dialog when openclipart.org is down ”
 <https://bugs.launchpad.net/inkscape/+bug/889421>

Revision history for this message
jazzynico (jazzynico) wrote :

Tested with Inkscape 0.48.2 and 0.48.3.1 on Ubuntu 11.04. No crash. Just get the following message in an error dialog (as expected):
"Failed to receive the Open Clip Art Library RSS feed. Verify if the server name is correct in Configuration->Import/Export (e.g.: openclipart.org)"

Also tested with the trunk. No error and no crash. The result list just stays blank when the throbber stops.

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Debian Wheezy, Inkscape 0.48.1. Same crash report as the original reporter.
Additionnal gdb message (before bt):

-----
(gdb) run
Starting program: /usr/bin/inkscape
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb1025b70 (LWP 1966)]
http://openclipart.org/media/feed/rss/test:2: parser error : Extra content at the end of the document
<link rel="alternate" type="application/rss+xml" title="Top 10 Cliparts" href="/
^

Program received signal SIGSEGV, Segmentation fault.
0x08620b0b in Inkscape::UI::Dialog::FileImportFromOCALDialog::print_xml_element_names(_xmlNode*) ()
-----

No crash and no message with the trunk.

Revision history for this message
ScislaC (scislac) wrote :

JazzyNico: It appears we're not trying to even get the feeds from the right place.

As opposed to:
http://openclipart.org/media/feed/rss/

We should be using:
http://openclipart.org/api/search/?query=

An example would be:
http://openclipart.org/api/search/?query=water

I did change the location locally in my copy of ocaldialogs.cpp locally and unfortunately it causes segfaults (however, when not modified it just fails quietly and doesn't crash).

Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

For openclipart is because we move to new Aiki framework and it seams that there is bug in new version, but cann be fixed in this current version of Aiki, with one tweak.

Changed in openclipart:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Jakub Jankiewicz (jcubic)
Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

I fixed on ocal side and I tested on Inkscape ver 0.48.2 on Ubuntu and it work fine. You can test it and mark for Inkscape as fixed.

PS: next time when you have this kind of bug please add Openclipart as another project that affect this bug.

Changed in openclipart:
status: Confirmed → Fix Committed
milestone: none → 3.2
Revision history for this message
su_v (suv-lp) wrote :

> You can test it and mark for Inkscape as fixed.

Upstream fix in Openclipart confirmed on OS X 10.7.3 with Inkscape 0.48.2 and 0.48.3.1 ('File > Import from Open Clip Art Library' works fine again). Thx!

Proposing to keep the report open ('Confirmed') for project 'Inkscape' for now:
- As mentioned in comment #4, Inkscape ought to handle upstream issues with the feeds without crash (probably related to bug #889421).
- The report(s) need further testing & confirmation whether both issues are handled without causing a crash in current trunk (new ocal import dialog).

> PS: next time when you have this kind of bug please
> add Openclipart as another project that affect this bug.

Sorry to have missed that - will be done next time similar issues with ocal import in Inkscape are reported.

Revision history for this message
jazzynico (jazzynico) wrote :

~ScislaC - Not sure about the link. Apparently, the generic API and the RSS link are almost identical. The generic API is still RSS, but adds a <content:encoded> element that encloses the description in CDATA.
And I see nowhere in the doc (http://openclipart.org/docs/api) which one should be preferred.

~Jakub - Could you please give you opinion on the API we should use in Inkscape?

Revision history for this message
ScislaC (scislac) wrote :

JazzyNico: I got that from an email discussion with Jakub. When he asked about the url we were using, he gave the API link as an example. When I said we'd fix the url moving forward, there was no indication that we shouldn't or that there was no need. We can certainly wait to hear an official opinion though.

Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote : Re: [Bug 989257] Re: Inkscape crashes when I search the Open Clip Art Library

I rewrite the rss API recently because there where bugs, the xml was
invalid (there ware unescape & in text) I don't know if link that use
inkscape is free of this bugs and simple Inkscape it handle them.

I don't remember if RSS API is using Sphinx search (which is use for
normal search) if it doesn't then it will, so API search will be the
same as normal search you will get the same clipart. and sphinx is
faster and more accurate.

If they are almost the same then maybe I will need to remove one of
them, If I remove one link I will put redirect. Does Inkscape will
handle HTTP redirect?

Maybe Inkscape don't need to use new API for now. I don't want to break
old version of Inkscape so if Inkscape will not handle redirect I can
put the same code as for API search if it's the same purpose and return
the same stuff then it can be identical.

On Sat, 12 May 2012 18:20:52 -0000
JazzyNico <email address hidden> wrote:

> ~ScislaC - Not sure about the link. Apparently, the generic API and
> the RSS link are almost identical. The generic API is still RSS, but
> adds a <content:encoded> element that encloses the description in
> CDATA. And I see nowhere in the doc (http://openclipart.org/docs/api)
> which one should be preferred.
>
> ~Jakub - Could you please give you opinion on the API we should use in
> Inkscape?
>

--
Jakub Jankiewicz
www: http://jcubic.pl
twitter: http://twitter.com/jcubic
blog: http://jcubic.wordpress.com

Revision history for this message
rejon (rejon) wrote :

Yes, keep compatibility and same feed URL are very important, no matter what.

Jon

On Sun, May 13, 2012 at 3:25 AM, Jakub Jankiewicz
<email address hidden> wrote:
> I rewrite the rss API recently because there where bugs, the xml was
> invalid (there ware unescape & in text) I don't know if link that use
> inkscape is free of this bugs and simple Inkscape it handle them.
>
> I don't remember if RSS API is using Sphinx search (which is use for
> normal search) if it doesn't then it will, so API search will be the
> same as normal search you will get the same clipart. and sphinx is
> faster and more accurate.
>
> If they are almost the same then maybe I will need to remove one of
> them, If I remove one link I will put redirect. Does Inkscape will
> handle HTTP redirect?
>
> Maybe Inkscape don't need to use new API for now. I don't want to break
> old version of Inkscape so if Inkscape will not handle redirect I can
> put the same code as for API search if it's the same purpose and return
> the same stuff then it can be identical.
>
>
> On Sat, 12 May 2012 18:20:52 -0000
> JazzyNico <email address hidden> wrote:
>
>> ~ScislaC - Not sure about the link. Apparently, the generic API and
>> the RSS link are almost identical. The generic API is still RSS, but
>> adds a <content:encoded> element that encloses the description in
>> CDATA. And I see nowhere in the doc (http://openclipart.org/docs/api)
>> which one should be preferred.
>>
>> ~Jakub - Could you please give you opinion on the API we should use in
>> Inkscape?
>>
>
> --
> Jakub Jankiewicz
> www: http://jcubic.pl
> twitter: http://twitter.com/jcubic
> blog: http://jcubic.wordpress.com
>
> --
> You received this bug notification because you are a member of
> openclipart.devel, which is subscribed to openclipart.
> https://bugs.launchpad.net/bugs/989257
>
> Title:
>  Inkscape crashes when I search the Open Clip Art Library
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/989257/+subscriptions

--
Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon
+1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing)

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I've linked a similar/identical report in Debian. Feel free to unlink if you think this is unrelated.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
su_v (suv-lp) wrote :

> I've linked a similar/identical report in Debian.

Indeed Inkscape 0.48.3.1 is crashing once again when import from Open ClipArt (same build, no local changes).

@Jakub - have there been changes again in the feed? Would you prefer a new separate report? Unfortunately, I can't tell when importing from ocal in inkscape started to fail again.

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Attaching strace from Debian tracker, if this is of any use.

Changed in inkscape (Debian):
status: Unknown → Confirmed
Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

I don't know what happen, I update Aiki yesterday, but this url look fine http://openclipart.org/media/feed/rss/cat and validator show it's valid rss

Content-Type is application/xml; should it be different? Ah and I enable gzip on the server (but Strace show xml tags). Does those changes can be the cause of this?

Changed in openclipart:
status: Fix Committed → Confirmed
Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

Inkscape was killed by this line:

<content:encoded><![CDATA[ Cartoon cat. ]]></content:encoded>

I remove it

Changed in openclipart:
status: Confirmed → Fix Committed
Revision history for this message
rejon (rejon) wrote :

Cool, Josh, can you make sure Inkscape list and people find out that
openclipart search should be working again.

Thanks!

On Wed, Jun 6, 2012 at 5:34 AM, Jakub Jankiewicz
<email address hidden> wrote:
> Inkscape was killed by this line:
>
> <content:encoded><![CDATA[ Cartoon cat. ]]></content:encoded>
>
> I remove it
>
> ** Changed in: openclipart
>       Status: Confirmed => Fix Committed
>
> --
> You received this bug notification because you are a member of
> openclipart.devel, which is subscribed to openclipart.
> https://bugs.launchpad.net/bugs/989257
>
> Title:
>  Inkscape crashes when I search the Open Clip Art Library
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/989257/+subscriptions

--
Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon
+1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing)

Revision history for this message
su_v (suv-lp) wrote :

Jakub Jankiewicz wrote
> Inkscape was killed by this line:
> <content:encoded><![CDATA[ Cartoon cat. ]]></content:encoded>
> I remove it

Thx for investigating and figuring out the actual trigger: upstream fix confirmed with Inkscape 0.48.2 and 0.48.3.1 on OS X 10.7.4 (searching and importing from Open Clipart works again without Inkscape crashing).

Beluga (buovjaga)
Changed in inkscape:
status: Triaged → Fix Released
Changed in inkscape (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.