Segmentation fault on MagickResizeImage in CLI

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
Posts: 4
Joined: 2015-06-12T13:19:21-07:00
Authentication code: 6789

Segmentation fault on MagickResizeImage in CLI

Post by spiderr »

I have a very simple script that thumbnails images on the command line. When MagickResizeImage is called, the script segfaults on termination (everything works, just seg faults when done - I remember a similar issue years ago when you didn't DestroyMagickWand( $magickWand ) things would crash). I have tried php 5.4.42 and php 5.6.10

FWIW, I was testing with this image:


Code: Select all

    $magickWand = NewMagickWand();
    MagickReadImage( $magickWand, "/tmp/0HFF1UYS9S.jpg" );
    // this call causes segfault on exit.
    MagickResizeImage( $magickWand, 100, 78, MW_BesselFilter, 1.00 );
    MagickWriteImage( $magickWand, "/tmp/thumb.jpg" );
    DestroyMagickWand( $magickWand );

Code: Select all

[apache@vice tmp]$ php /tmp/debug.php
Segmentation fault (core dumped)
(gdb) bt
#0  0x00007f87f68e205c in ?? ()
#1  0x00007f87f68e10a0 in ?? ()
#2  0x00007f87ebce6db8 in ?? ()
#3  0x0000000000000000 in ?? ()
CentOS 6.6 with remi RPMs.
User avatar
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Segmentation fault on MagickResizeImage in CLI

Post by magick »

We're using ImageMagick 6.9.1-5, PHP MagickWand, under Fedora and your program worked fine. We're not sure why it failed for you.
Post Reply