#140 djvu-3.5.21_p20090103 crashs with evince

libdjvu (18)
Volkov Peter

We received the following bug report:

Although it was filled about evince backtrace shows that it crashes inside /usr/lib/libdjvulibre.so and it looks like thread support inside djvu triggers this. So if djvu is built with --disable-threads it crashs and with --enable-threads it works. This bug was reproduced with CVS version as of 20090103.

Personally I failed to reproduce this bug but probably somebody of you will find the reasons from backtrace? this is url with the book which triggers this bug:


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4180f950 (LWP 30472)]
0x00007f7840e29b1d in GSafeFlags::operator long (this=0x179)
at GThreads.cpp:1837
1837 GThreads.cpp: No such file or directory.
in GThreads.cpp
Current language: auto; currently c++
#0 0x00007f7840e29b1d in GSafeFlags::operator long (this=0x179)
at GThreads.cpp:1837
#1 0x00007f7840eaae0e in DjVuFile::is_data_present (this=0x61)
at DjVuFile.h:736
#2 0x00007f7840eb8248 in DjVuDocument::process_threqs (this=0x192de10)
at DjVuDocument.cpp:1113
#3 0x00007f7840eb9f7d in DjVuDocument::get_thumbnail (this=0x192de10,
page_num=9, dont_decode=false) at DjVuDocument.cpp:1369
#4 0x00007f7840f0c5cd in ddjvu_thumbnail_status (document=0x192b1a0,
pagenum=9, start=1) at ddjvuapi.cpp:2479
#5 0x00007f784118090b in djvu_document_thumbnails_get_thumbnail (
document=0x123e800, rc=0x1924860, border=1) at djvu-document.c:538
#6 0x00007f784c0b99ca in ev_document_thumbnails_get_thumbnail (
document=0x123e800, rc=0x1924860, border=1) at ev-document-thumbnails.c:58
#7 0x000000000042385f in ev_job_thumbnail_run (job=0x122d700) at ev-jobs.c:665
#8 0x00000000004223c2 in ev_job_run (job=0x122d700) at ev-jobs.c:203
#9 0x0000000000421454 in ev_job_thread (job=0x122d700)
at ev-job-scheduler.c:183
#10 0x0000000000421561 in ev_job_thread_proxy (data=0x0)
at ev-job-scheduler.c:213
#11 0x00007f7846e378d1 in g_thread_create_proxy (data=0x1220c90)
at gthread.c:635
#12 0x00007f784aae7087 in start_thread (arg=<value optimized="" out="">)
at pthread_create.c:297
#13 0x00007f7846b41ccd in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

Thank you in advance for any help.


  • Leon Bottou
    Leon Bottou

    So if djvu is built with --disable-threads it crashes and
    with --enable-threads it works.

    DjvuLibre is not designed to work with option --disable-threads.
    This is a debug feature that was useful on very old machines.
    In fact it is possible to construct djvu documents that
    cannot be decoded without the threaded decoder.

    It is true that it should not crash, but it should not work anyway.
    So this is low on my priorities.
    - L.