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
spiderr
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: https://stocksnap.io/photo/0HFF1UYS9S

Script:

Code: Select all

<?php
    $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 ?? ()
Environment:
CentOS 6.6 with remi RPMs. http://blog.famillecollet.com
ImageMagick-last-6.9.1.4-1.el6.remi.x86_64
php-magickwand-1.0.9.2-9.el6.remi.5.6.x86_64
php-cli-5.6.10-1.el6.remi.x86_64
User avatar
magick
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 1.0.9.2-7, under Fedora and your program worked fine. We're not sure why it failed for you.
Post Reply