On Wed, Sep 03, 2008 at 03:09:26PM +0100, Ed Loach wrote: > Rmtree in method cleanup in tileset.pm (line 765 in the version I have here) > fails on Windows (at least on the Vista and XP machines I've tried here) > because the split_*.png files are locked until the client exits. > > I've used ProcessMonitor to try and work out what is happening. Inkscape is > creating the files and closing them. Perl is then reading the file and not > closing it. > > Looking at the Perl code, I'm wondering about svg2png, and in particular the > last line > > return ($FullSplitPngFile, ""); #return success > > The comments at the top of the method suggest that the first parameter should > be 0 or 1. I don't know Perl (as I'm sure I'll say many times) but it looks > like we're at least returning the file name (with path), or perhaps even the > file itself (which might explain why ProcessMonitor shows the file being read > and not closed?).
The comment is misleading. $FullSplitPngFile is only a string with the filename, svg2png does not open the file at all. The only place I can see it being read by perl is in splitImageX where it does my $Image = newFromPng GD::Image($File); The GD documentation leads me to believe that this should be the same as doing the following: open(PNG, $File) || die; $Image = newFromPng GD::Image(\*PNG) || die; close(PNG) || die You might want to try substituting the latter line with this and see if it works. -- Knut Arne Bjørndal aka Bob Kåre [EMAIL PROTECTED] [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Tilesathome mailing list [email protected] http://lists.openstreetmap.org/listinfo/tilesathome
