[Tilesathome] Little patch to prevent crashing

Andreas Jobs andreas.jobs+tah at ruhr-uni-bochum.de
Mon Nov 30 09:21:20 GMT 2009


Hi *,

from time to time my t at hs are crashing while "Splitting stripe ...". I've
attached a patch to prevent t at h from crashing in this particular situation. It
would be nice if someone could apply this patch to the svn version :-)

--Andreas
-- 
! Andreas Jobs                                 Network Operation Center !
!                                              Ruhr-Universitaet Bochum !
! The only way to clean a compromised system is to flatten and rebuild. !
-------------- next part --------------
--- lib/Tileset.pm.orig	2009-11-30 10:08:11.000000000 +0100
+++ lib/Tileset.pm	2009-11-22 10:40:22.000000000 +0100
@@ -1328,7 +1328,9 @@
         ::statusMessage("Splitting stripe $stripe",0,3);
 
         my $png_file = File::Spec->join($self->{JobDir},"$layer-z$zoom-s$stripe.png");
-        my $Image = GD::Image->newFromPng($png_file);
+        my $Image = undef;
+
+        eval { $Image = GD::Image->newFromPng($png_file); };
 
         if( not defined $Image ) {
             throw TilesetError "SplitTiles: Missing File $png_file encountered", "fatal";


More information about the Tilesathome mailing list