[BUG!!] Java Mapscript crashes when debugging is not set on a MAP

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Thu Apr 13 08:42:55 EDT 2006


Replying to myself...

Also shp2img crashes. Running through gdb leads to a segfault at the
following line (mapdraw.c:454)

snip

    for(i=0; i<map->numlayers; i++) {

line 454>>>        if (map->debug || lp->debug)
            msGettimeofday(&starttime, NULL);

        if (map->layerorder[i] != -1) {
            lp = &(map->layers[ map->layerorder[i]]);

/snip

and in fact lp is used before it is even assigned. The change was
committed to cvs last week on the 8th of April. I'll fix it right
away.

Ciao,
Umberto

On 4/12/06, Umberto Nicoletti <umberto.nicoletti at gmail.com> wrote:
> As the subject says Java mapscript crashes when debugging is not set
> at the MAP level.
>
> Steps to reproduce:
>
> cvs co mapserver
> compile
> cd mapscript/java && make interface clean all test
>
> at which point the DrawMap java example will crash giving the followin output:
>
> java -classpath ./:examples/:./mapscript.jar -Djava.library.path=.
> DrawMap ../../tests/test.map ./map.png
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  SIGSEGV (0xb) at pc=0x45b6da8a, pid=24833, tid=16384
> #
> # Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode, sharing)
> # Problematic frame:
> # C  [libmapscript.so+0x98a8a]  msDrawMap+0x62
> #
> # An error report file with more information is saved as hs_err_pid24833.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> make: *** [test] Aborted (core dumped)
>
> To solve the issue just enable debugging at the map level (add DEBUG ON).
>
> Anyone knows or at least has an idea of what's going on?
>
> Last time I checked Java mapscript it was with 4.8.1 (but could have
> been 4.8.0) so the culprit  should be something added recently.
>
> Regards,
> Umberto
>



More information about the mapserver-dev mailing list