It's definenitely a file handle leak (well very much looks like it), this
was my first thought when this
happened to me. Almost exactly the same symptoms as Tony Dyson (see below).
Which GD are you referring to when you say . "I've rebuilt GD with the
latest version of the library > (1.4). Can you re-install GD and try
again?" as I have this
http://www.activestate.com/PPMPackages/zips/6xx-builds-only/GD.zip and it
still produces the same problem. I would also add that leaving out TTF from
the x & y labels and axis makes graph creation much faster. I now only use
TTF for the title. Each graph without x & y TTF takes about .75 a second to
create, with x & y TTF this is about 2-3 seconds for each graph.
Some GD::Graph settings from my program
$graph = GD::Graph::bars3d->new(639,265);
$graph->set_title_font('arial',24);
$graph->set_x_label_font('arial', 10);
$graph->set_y_label_font('arial', 10);
$graph->set_x_axis_font('arial', 8);
$graph->set_y_axis_font('arial', 8);
$graph->set(x_label => "$x_label");
$graph->set(y_label => "$y_label");
$graph->set(title => "$png_title");
$graph->set(cycle_clrs => 1);
$graph->set(bar_spacing => 3);
produces an error after my code creates 5 graphs
..
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_in.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_in_events.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_out.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_out_events.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_hour_in.png
Problem opening c:/mydocu~1/webtrend/tlog\bytes_by_hour_in_events.png -
error message - No such file or directory at C:\My
Documents\WebTrend\tlog.pl line
1048.
Line 1048 being
open(IMAGEFILE, ">$html_path\\$png_file_name") or die "Problem opening
$html_path\\$png_file_name - error message - $!";
with the 4 lines for x & y label and font commented out as below
$graph = GD::Graph::bars3d->new(639,265);
$graph->set_title_font('arial',24);
#$graph->set_x_label_font('arial', 10);
#$graph->set_y_label_font('arial', 10);
#$graph->set_x_axis_font('arial', 8);
#$graph->set_y_axis_font('arial', 8);
$graph->set(x_label => "$x_label");
$graph->set(y_label => "$y_label");
$graph->set(title => "$png_title");
$graph->set(cycle_clrs => 1);
$graph->set(bar_spacing => 3);
produces all my graphs. I have tried this with up to 100 graphs to be sure.
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_in.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_in_events.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_out.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_day_out_events.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_hour_in.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_hour_in_events.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_hour_out.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_hour_out_events.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_dayofyearin1.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_dayofyearin2.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_dayofyearout1.png
Created PNG file c:/mydocu~1/webtrend/tlog\bytes_by_dayofyearout2.png
Phill
Phill Hardstaff
Senior Support Engineer
Secretariat of the Pacific Community
B.P. D5
Noumea Cedex
New Caledonia
Phone +687-260141
Fax +687-263818
Email [EMAIL PROTECTED]
SPC Web Page http://www.spc.org.nc
Personal Web Page http://www.hardstaff.com
Personal Email [EMAIL PROTECTED]
Personal Fax +1 (603) 299-5640
----- Original Message -----
From: "Murray Nesbitt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 3:16 PM
Subject: RE: Activeperl: trouble with GD and TTF support
>
> > Strangely, the error the script dies with is not always directly TTF
> > related. Sometimes it occurs directly when I make a StringTTF call
> > ("problem loading glyph" or some such thing). Other times it will fail
> > to open a scratch file. Things seem to be pointing towards a memory or
> > resource leak.
>
> It sounds like version 1.3.1 of the freetype library might have introduced
> a filehandle leak. I've rebuilt GD with the latest version of the library
> (1.4). Can you re-install GD and try again?
>
> Murray
>
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activeperl
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl