Segmentation fault adding a new layer with php-mapscript
(4.6beta3)
Bill Binko
bill at BINKO.NET
Mon Jun 6 15:04:47 EDT 2005
On Mon, 6 Jun 2005, Nicol Hermann wrote:
> Bill,
>
> Am Montag, den 06.06.2005, 10:19 -0400 schrieb Bill Binko:
> > On Mon, 6 Jun 2005, Nicol Hermann wrote:
> >
>
> <cut>
>
> >
> > > Sadly the segfault persists.
> >
> > bummer
> >
> > >
> > > Maybe of note PHP is compiled as cgi with the flag
> > > '--with-regex=system'.
> >
> > That was what the configure script detected, so that's good.
> >
> > At this point, it might not be the regex problem.. could you run it in gdb
> > and post the results? That would show us what the corruption was.
Hmm..
> 0x4114ea30 in layerObj_new (map=0x41f88008) at mapscript_i.c:410
> 410 map->layerorder[map->numlayers] = map->numlayers;
> (gdb)
Looks like the layerorder array has not been malloc'd or that the sizeof
the struct is munched (so that map->layerorder doesn't point to the right
place).
The first would be a problem with initMap not being called or someone
overwriting layerorder. The second could be the mismatch in regex.
However, that's looking less likely now.
Could you try building with a simpler configure line? I do not have all
of the components (Oracle etc) that are needed for yours.
Here is what I just tested with (and it worked for me):
./configure --with-xpm=/usr/X11R6 --with-proj --with-postgis
--with-gd=/gis/libs/ --prefix=/usr --with-curl --with-ogr=/usr
--with-wmsclient --enable-debug
--with-http=/usr/sbin/httpd2 --with-php=/usr --with-wmsserver
Obviously, you'll need to change the --with-xpm etc.
Try that and see if it still crashes: if not, we'll find the offensive
option. If so, at least we'll be on the same page.
Bill
More information about the mapserver-dev
mailing list