#36418 [Fbk]: Graphics errors on multiple processes

From: Date: Thu, 16 Feb 2006 15:19:40 +0000
Subject: #36418 [Fbk]: Graphics errors on multiple processes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93343@lists.php.net to get a copy of this message
ID: 36418 Updated by: pajoye@php.net Reported By: jraben at alstermedia dot de Status: Feedback Bug Type: GD related Operating System: Win XP PHP Version: 5.1.2 New Comment: Please provide a set of source images and a valid script to reproduce the problems. That means a working script, valid filenames, source images, etc. Previous Comments: ------------------------------------------------------------------------ [2006-02-16 16:10:18] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-02-16 15:31:17] jraben at alstermedia dot de Description: ------------ It's a script that joins a background .gif picture with transparent png 24-bit pictures to a thumb jpg. It actually no the complete script. $bfile is always the same. $file and $target may vary. Some files have corrupted backgrounds, if the script is started in multiple instances at the same time. Seems to be a memory allocation bug. Reproduce code: --------------- $img = @imagecreatefromgif("$bfile"); $imgobj = @imagecreatefrompng("$file"); imagealphablending ( $imgobj, true ); $width = imagesx($imgobj); $height = imagesy($imgobj); $imgnew = imagecreatetruecolor($width, $height); imagecopyresampled($imgnew,$img,0,0,$x,$y,$width,$height,$width,$height); imagecopyresampled($imgnew,$imgobj,0,0,0,0,$width,$height,$width,$height); imagejpeg($imgnew, $target, 90); Expected result: ---------------- Not currupted pictures as .jpg with $bfile gif as background and $file .png as foreground. Actual result: -------------- Some files have corrupted backgrounds, if this script is started in multiple instances at the same time. Seems to be a memory allocation bug or something with loading the same picture multiple times at the same time. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36418&edit=1

« previous php.bugs (#93343) next »