Bug #18238: Apache segfaults on Ming code
| From: | twan at bitpress dot nl | Date: | Tue, 09 Jul 2002 10:25:39 +0000 |
| Subject: | Bug #18238: Apache segfaults on Ming code | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-13584@lists.php.net to get a copy of this message | ||
From: twan@bitpress.nl
Operating system: Debian/GNU Linux
PHP version: 4.2.1
PHP Bug Type: Reproducible crash
Bug description: Apache segfaults on Ming code
L.S.,
In a futile attempt to make a clickable image in a Flash movie, I
encountered something I think should not happen at all. While I may be
unexperienced using Ming and am probably doing something wrong in my
efforts, a segmentation fault I think is not appropriate :)
[Tue Jul 9 11:45:18 2002] [notice] child pid 6277 exit signal
Segmentation fault (11)
I am running Apache 1.3.26-1, PHP 4.2.1-3 and Ming 0.2a.cvs20020110-3 on a
Debian/GNU Linux system. Each time the following script is executed, the
Apache childe crashes with a segmentation fault:
<?php
$filename = "result.jpg";
$fp = fopen($filename,"r");
$i = fread($fp,999999);
$img = new SWFBitmap($i); #don't give "fread(...)" as argument, but buffer
it.
fclose($fp);
$s = new SWFShape();
#$s->setRightFill($s->addFill(0xff, 0, 0));
#$s->drawLine(100,0);
#$s->drawLine(0,100);
#$s->drawLine(-100,0);
#$s->drawLine(0,-100);
$s->setLeftFill($s->addFill($img));
$b = new SWFButton();
$b->addShape($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_DOWN |
SWFBUTTON_OVER);
$b->addAction(new SWFAction("startDrag('/test', 0);"), // '0' means
don't
lock to mouse
SWFBUTTON_MOUSEDOWN);
$b->addAction(new SWFAction("stopDrag();"),
SWFBUTTON_MOUSEUP | SWFBUTTON_MOUSEUPOUTSIDE);
$p = new SWFSprite();
$p->add($b);
$p->nextFrame();
$swf = new SWFMovie();
$swf->setDimension(504, 501);
$i = $swf->add($p);
$i->setName('test');
$i->moveTo(100,100);
$swf->nextframe();
$swf->add($img); #this will create a shape with perfect proportions and
fills it
header('Content-type: application/x-shockwave-flash');
$swf->output();
?>
--
Edit bug report at http://bugs.php.net/?id=18238&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18238&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18238&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18238&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18238&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18238&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18238&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18238&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18238&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18238&r=globals