[mapserver-users] Possible bug with 3.5 code w/ Proj 4

Rodrigo Becke Cabral cabral at yadata.net
Tue Nov 20 07:36:37 EST 2001


Hi there, sorry about the intrusion on your chat, but using a "void *" to
make structures be the same size doesn't sounds good to me. Looks more like
Scott is linking code that has been compiled with different options (w/&w/o
proj), although he mentioned in it's previous e-mail that he cleaned
everything up, reconfigured and rebuild the code, still I think something's
wrong. Here's the clue from where I make this assumption:

----- Original Message -----
From: "Scott Shealy" <sshealy at e811.com>
Sent: Monday, November 19, 2001 5:26 PM
Subject: [mapserver-users] Possible bug with 3.5 code w/ Proj 4
> (...) configure --without-ogr
> did a make clean and then a make again... recompiled my test program.. and
> changed my map file so that it doesn't have any PROJECTION options(BTW if
you
> don't do that you an immediate core dump I guess b/c of the lack of
> PROJECTION SUPPORT)

The "immediate core dump" is what tricks me out. He actually should get an
"Projection support is not available." issued by msLoadProjectionString in
mapfile.c (or something like that, I just made a quick look at the files).
So I guess one might check where the error actually is (either in Scott's
coding/compiling or in mapserver's mapfile.c/mapproject.c); or perhaps this
would be one of those infamous hard-to-find-but-suddenly-it's-gone-error.

Best regards,
Rod.

----- Original Message -----
From: "Frank Warmerdam" <warmerdam at pobox.com>
To: <sshealy at e811.com>
Cc: <mapserver-bug at lists.gis.umn.edu>; <mapserver-users at lists.gis.umn.edu>
Sent: Tuesday, November 20, 2001 12:12 AM
Subject: Re: [mapserver-users] Possible bug with 3.5 code w/ Proj 4


Scott Shealy wrote:

> I am stumped... is this a bug?... Am I doing something wrong.? I need the
> projection stuff to work and I need to do it this way b/c I am using the
> mapscript interface in a java project.  But when testing I ran into this
> problem so I pulled the java stuff out of the equation by writing test.c
> above to isolate the problem ... BTW I have got the mapscript interface
> working in java and I am planning to post to the mailing list how I did
that
> as soon as the project is complete(deadlines are looming and I am working
65
> hrs a week ... or I would do it now!)
>
> Any help is greatly appreciated...
>
> BTW we have been using mapserver for about 2 weeks and we LOVE IT!!!!


Scott,

I encountered exactly the same problem.  It turns out that mapObj includes
a projectionObj, but the size of projectionObj (in mapproject.h) changes
depending on whether USE_PROJ is defined or not.  USE_PROJ is consistently
defined for all the regular MapServer components by the makefile, but your
mainline build did not define this symbol, and so projectionObj was smaller
and all the alighnment of stuff in mapObj was screwed up in your mainline.

Steve ... I would suggest we change projectionObj to look like this:

typedef struct {
  char **args; /* variable number of projection args */
  int numargs; /* actual number of projection args */
#ifdef USE_PROJ
  projPJ proj; /* a projection structure for the PROJ package */

#else
   void   *proj; /* dummy place holder */


#endif
} projectionObj;

instead of this:

typedef struct {
  char **args; /* variable number of projection args */
  int numargs; /* actual number of projection args */
#ifdef USE_PROJ
  projPJ proj; /* a projection structure for the PROJ package */
#endif
} projectionObj;

This change will ensure that projectionObj is always the same size

reguardless of whether USE_PROJ is defined for a given build.  What
do you think?

Scott ... your fix is to just build with -DUSE_PROJ on the commandline.

Best regards,

--
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the mapserver-users mailing list