Segmentation fault with djvu files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Yrogirg
Posts: 2
Joined: 2012-08-25T03:14:00-07:00
Authentication code: 67789

Segmentation fault with djvu files

Post by Yrogirg »

I want to adjust levels in a djvu files, but whatever file I took I get "Segmentation fault":

Code: Select all

$ convert bsz.djvu -level 0,10,65000 out.djvu
Segmentation fault (core dumped)
One can get the file to test from http://math.ucr.edu/home/baez/bsz.html

Version from Ubuntu 12.04 repositories:

Code: Select all

Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP 
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Segmentation fault with djvu files

Post by magick »

Perhaps a transient bug. We're using ImageMagick 6.7.9-1, the latest release, and your command returns an exception as expected:
  • -> convert bsz.djvu -level 0,10,65000 out.djvu
    convert: no encode delegate for this image format 'out.djvu' @ error/constitute.c/WriteImage/1203.
Post a stack trace so we can debug the fault:
  • gdb convert
    run bsz.djvu -level 0,10,65000 out.djvu
    where
Yrogirg
Posts: 2
Joined: 2012-08-25T03:14:00-07:00
Authentication code: 67789

Re: Segmentation fault with djvu files

Post by Yrogirg »

Code: Select all

Starting program: /usr/bin/convert bsz.djvu -level 0,10,65000 out.djvu
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3027700 (LWP 2511)]
[Thread 0x7ffff3027700 (LWP 2511) exited]
[New Thread 0x7ffff3027700 (LWP 2512)]
[Thread 0x7ffff3027700 (LWP 2512) exited]
[New Thread 0x7ffff3027700 (LWP 2513)]
[New Thread 0x7ffff1415700 (LWP 2514)]
[New Thread 0x7ffff0c14700 (LWP 2515)]
[New Thread 0x7fffebfff700 (LWP 2516)]
[New Thread 0x7fffeb7fe700 (LWP 2517)]
[New Thread 0x7fffeaffd700 (LWP 2518)]
[New Thread 0x7fffea7fc700 (LWP 2519)]
[New Thread 0x7fffe9ffb700 (LWP 2520)]
[Thread 0x7fffe9ffb700 (LWP 2520) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3b2738a in ?? () from /usr/lib/ImageMagick-6.6.9/modules-Q16/coders/djvu.so

Code: Select all

(gdb) where
#0  0x00007ffff3b2738a in ?? () from /usr/lib/ImageMagick-6.6.9/modules-Q16/coders/djvu.so
#1  0x00007ffff79cf2c0 in ReadImage () from /usr/lib/libMagickCore.so.4
#2  0x00007ffff79d03db in ReadImages () from /usr/lib/libMagickCore.so.4
#3  0x00007ffff7680d38 in ConvertImageCommand () from /usr/lib/libMagickWand.so.4
#4  0x00007ffff76ecff3 in MagickCommandGenesis () from /usr/lib/libMagickWand.so.4
#5  0x00000000004007e7 in ?? ()
#6  0x00007ffff708976d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000400839 in ?? ()
#8  0x00007fffffffe7b8 in ?? ()
#9  0x000000000000001c in ?? ()
#10 0x0000000000000005 in ?? ()
#11 0x00007fffffffea68 in ?? ()
#12 0x00007fffffffea79 in ?? ()
#13 0x00007fffffffea82 in ?? ()
#14 0x00007fffffffea89 in ?? ()
#15 0x00007fffffffea94 in ?? ()
#16 0x0000000000000000 in ?? ()
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Segmentation fault with djvu files

Post by magick »

Looks like a bug in the DJVU decoder but your build does not have symbols so we don't know @ which line. If you get a chance, download / install ImageMagick 6.7.9-1 and see if that fixes the problem or if it still faults.
Post Reply