Link to home
Create AccountLog in
Avatar of techdoc6

asked on

Apache Segmentation Fault when running GIS MapServer Program

I'm working on a project which has GIS map generation capabilities. This functionality has been in the system for a while and has been functioning perfectly until yesterday when map generation attempts started to cause segmentation faults in Apache. After some debugging we determined that the seg fault was caused by a line of code that calls the draw() method on a layer called the baselayer. If anyone has any experience debugging this kind of software any advice would be greatly appreciated.
$baselayer = $map->getLayerByName("MyZipBase");
$baselayer->set("data","select zip5,shape from zipcode where zip5 not like '%HH' and MBRIntersects(GeomFromText('Polygon((".
						$minx." ".$miny.",".
						$minx." ".$maxy.",".
						$maxx." ".$maxy.",".
						$maxx." ".$miny.",".
						$minx." ".$miny."))' ),shape)");
	// do this here instead of above
	$baselayer->draw($image);  //Segfault here!!!!!!!!!!!!!!!!!!!

Open in new window

Avatar of mrfixit22

It looks like you have not defined IMAGE.  Here is a sample eample of another scipt that may help.
$map = ms_newMapObj("");
> $image = $map->draw();
> $layer = ms_newLayerObj($map);
> $layer = $map->getLayerByName("point");
> $layer->set('status', MS_ON);
> $pt = ms_newPointObj();
> $x = 29.1;

You can try updating your FIREFOX to the latest version or install an older version.  If it would with one of those it is an update to your PHP script or not allow FIREFOX.
Avatar of techdoc6

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account