php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19660 Creating GD image with FreeType causes Seg Fault
Submitted: 2002-09-29 09:36 UTC Modified: 2002-09-29 22:25 UTC
From: chindy at grocerygateway dot com Assigned:
Status: Closed Package: GD related
PHP Version: 4.2.3 OS: Linux 2.2.16-22 (RedHat 7.0)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chindy at grocerygateway dot com
New email:
PHP Version: OS:

 

 [2002-09-29 09:36 UTC] chindy at grocerygateway dot com
*** Script the reproduces the problem:

// graphing related includes 
require_once('jpgraph-1.8/jpgraph.php'); 
require_once('jpgraph-1.8/jpgraph_line.php'); 
$jpgcache = CACHE_DIR; 
$graph_name = 'chart.png'; 

. . . code to create data arrays . . . 

$graph = new graph(900, 400, $graph_name, 0, 0);
$graph->title->Set('Helpdesk Ticket Activity over previous 28 days.'); 
//$graph->title->SetFont(FF_ARIAL); 
$graph->img->SetMargin(70, 50, 30, 50); 
$graph->SetMarginColor('#D3DCE3');
$graph->SetScale('textlin'); 
$graph->xaxis->SetTitle('Time In Weeks','middle'); 
$graph->xaxis->SetFont(FF_FONT1,"8");
$graph->xaxis->SetTickLabels($labelArray);
$graph->yaxis->SetTitleMargin(40);
$graph->yaxis->SetTitle('Tickets','middle'); 
$graph->legend->SetLayout(LEGEND_HOR);
$graph->legend->Pos(0.05,0.5,"right","bottom");
$line1 = new LinePlot($dataOpenedArray); 
$line1->SetColor('red');
$line1->mark->SetType(MARK_UTRIANGLE); 
$line1->mark->SetFillColor('red'); 
$line1->SetLegend("Opened");
$line2 = new LinePlot($dataClosedArray); 
$line2->SetColor('darkgreen');
$line2->mark->SetType(MARK_DIAMOND); 
$line2->mark->SetFillColor('darkgreen'); 
$line2->SetLegend("Closed"); 

$graph->Add($line1); 
$graph->Add($line2); 

$graph->Stroke();
$imgSrc="{$jpgcache}{$graph_name}";
print "<img src='$imgSrc'>\n"; 

*** PHP Configure Line:
./configure  --with-apache=../apache_1.3.26 --with-config-file-path=/usr/local/apache/conf --with-mysql=/usr/local/mysql/ --enable-trans-sid --enable-debug=yes --enable-track-vars --with-zlib-dir=/usr/lib --with-gd=/usr/local --with-freetype-dir=/usr/local/include/freetype2 --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr --without-ttf

***Specific Setup Info:
Pretty much a "plain jane" apache 1.3.26.  No SSL, no mod_perl, no java.  mod_php is the only 3rd party module installed.

GD is 1.8.4.  FreeType is 2.1.2. PNG is 1.0.8. ZLib is 1.1.3. LibJPEG is 6b-13.


*** gdb backtrace:
#3691 0x81615f7 in execute ()
#3692 0x81615f7 in execute ()
#3693 0x81615f7 in execute ()
#3694 0x816370b in execute ()
#3695 0x813bfa8 in zend_execute_scripts ()
#3696 0x80833f6 in php_execute_script ()
#3697 0x8147d1a in apache_php_module_main ()
#3698 0x807f516 in php_restore_umask ()
#3699 0x807f571 in php_restore_umask ()
#3700 0x816bad1 in ap_invoke_handler ()
#3701 0x81810ff in ap_some_auth_required ()
#3702 0x8181160 in ap_process_request ()
#3703 0x8177e09 in ap_child_terminate ()
#3704 0x8177fb4 in ap_child_terminate ()
#3705 0x8178124 in ap_child_terminate ()
#3706 0x817879d in ap_child_terminate ()
#3707 0x817902b in main ()
#3708 0x40138b65 in __libc_start_main (main=0x8178c74 <main>, argc=2, ubp_av=0xbffffb24, init=0x80642a8 <_init>, 
    fini=0x81b4e3c <_fini>, rtld_fini=0x4000df24 <_dl_fini>, stack_end=0xbffffb1c) at ../sysdeps/generic/libc-start.c:111

*** Final Comments:
Help!  I can compile 4.2.3 fine to draw PNG's, but the minute I add FreeType support, everything breaks.  Any suggestions welcome!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-29 09:39 UTC] sander@php.net
Please recompile PHP with --enable-debug and supply a new backtrace. Also, please post a short and simple sample script (without jpgraph).
 [2002-09-29 09:39 UTC] rasmus@php.net
My rule of thumb has always been to use FreeType1 with GD1 and FreeType2 with GD2 and it has always worked.  When mixing those up things start to break.  So, try either downgrading your FreeType or Upgrading your GD and let us know if that fixes it.
 [2002-09-29 22:25 UTC] chindy at grocerygateway dot com
Please close this bug, I have resolved the issue.  There were some "creative irregularities" in my build environment that I didn't notice and was not aware of.  Thanks for all the help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC