Open Clipart import dialog crashes with concurrent searches

Bug #1281104 reported by jazzynico on 2014-02-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Originaly reported in meta Bug #943275 (New 'Import Clip Art…' dialog crashes).

Reproduced on Ubuntu 12.04 and Crunchbang Waldorf.

1. Open the Import Openclipart dialog (File>Import Clipart).
2. Search for "a"
3. Click any result
4. While the preview image is still loading
5. Search for "b"
6. Click any result

Trace (Crunchbang, r13033):
(gdb) run
Starting program: /usr/local/bin/inkscape
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7fffdf0e9700 (LWP 6600)]
GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Argument invalide. Aborting.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdf0e9700 (LWP 6600)]
0x00007fffeee8b475 in raise () from /lib/x86_64-linux-gnu/
(gdb) bt
#0 0x00007fffeee8b475 in raise () from /lib/x86_64-linux-gnu/
#1 0x00007fffeee8e6f0 in abort () from /lib/x86_64-linux-gnu/
#2 0x00007fffefbbb143 in ?? () from /lib/x86_64-linux-gnu/
#3 0x00007fffefc24815 in g_private_set () from /lib/x86_64-linux-gnu/
#4 0x00007ffff56952e3 in g_input_stream_read () from /usr/lib/x86_64-linux-gnu/
#5 0x00007ffff567cd1a in ?? () from /usr/lib/x86_64-linux-gnu/
#6 0x00007ffff568116f in g_file_copy () from /usr/lib/x86_64-linux-gnu/
#7 0x00007ffff568198a in ?? () from /usr/lib/x86_64-linux-gnu/
#8 0x00007ffff56967ae in ?? () from /usr/lib/x86_64-linux-gnu/
#9 0x00007fffefc0b742 in ?? () from /lib/x86_64-linux-gnu/
#10 0x00007fffefc0af45 in ?? () from /lib/x86_64-linux-gnu/
#11 0x00007fffef1e9b50 in start_thread () from /lib/x86_64-linux-gnu/
#12 0x00007fffeef33a7d in clone () from /lib/x86_64-linux-gnu/
#13 0x0000000000000000 in ?? ()

The console adds the following message (when launched without gdb):

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
inkscape: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

jazzynico (jazzynico) wrote :

Not reproduced on Windows XP, Inkscape trunk revision 13031.

jazzynico (jazzynico) wrote :

A possible workaround would be to deactivate the search field and button while a file is being downloaded.
I'm going to take a look on how complex it would be.

jazzynico (jazzynico) wrote :

Forgot my previous comment, Inkscape crashes even if the preview zone is updated with the first clipart's thumbnail.

jazzynico (jazzynico) wrote :

Based on the libxml2 document (, xmlCleanupParser() should be called only once. In openclipart.cpp, it is called each time we update the search list.

The attached patch moves xmlCleanupParser() to the dialog's destructor.
Tested successfully on Windows XP and Crunchbang Waldorf, Inkscape trunk revision 13033.

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
jazzynico (jazzynico) wrote :

Please confirm it fixes the issue on other systems.

jazzynico (jazzynico) wrote :

Correction, the libxml2 related link is:

jazzynico (jazzynico) wrote :

Fix committed revision 13042.

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico) on 2015-02-14
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers