mapserv segfaults trying to get the query results of a native oracle spatial data source

Fernando Simon fsimon at UNIVALI.BR
Thu Apr 28 10:42:32 EDT 2005


Hi Nicol,
    This problem can be a bug in maporaclespatial.c in 4.4.2 version.
In this version of Mapserver the maporaclespatial is a 1.16 version,
a old version (now it is a 1.25). I fixed some problems with OCI
handlers between 1.6 and 1.25, the last version 1.25 can work
correctly for you.
    But, it's a strange problem, how did you define oracle spatial
layer? Did you define the template for the layer? Did you define any
filter parameter for the layer?
    Thanks.

ps: for cvs version specify the --enable-point-z-m flag

------------------------------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratorio de Computacao Aplicada - Brazil
http://g10.cttmar.univali.br - UNIVALI/CTTMAR
------------------------------------------------------------------------

Citando Nicol Hermann <mapserver at GEOWORLD.DE>:

> Dear list,
>
> I want to use the query function of the native Oracle Spatial
> support
> (INPUT=ORACLESPATIAL) from mapserver 4.4.2.
> Displaying the image is no problem but when try to get the query
> results
> mapserver crashes with a segmentation fault.
>
> Here is what i try to do:
>
> for($j = 0;$j < $Layer->getNumResults(); $j++) {
>   $oRes = $Layer->getResult($j);
>   $shpobj = $Layer->getShape($oRes->tileindex,$oRes->shapeindex);
> // <-
> Line which causes the Segmentation fault
>   $shpobj->free();
> }
>
> Is this a bug or do i have to change something?
> My system is:
> Debian sarge, mapserver 4.4.2 (php Mapscript), oracle 10g
>
> Attached you find the output of gdb.
>
> Any help are welcome
> Nicol
>
>
> gdb php
> GNU gdb 6.3-debian
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License,
> and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i386-linux"...Using host libthread_db
> library "/lib/libthread_db.so.1".
>
> (gdb) run nativ_oraclequelle_query.php
> Starting program: /usr/local/bin/php nativ_oraclequelle_query.php
> [Thread debugging using libthread_db enabled]
> [New Thread 16384 (LWP 8826)]
> [Thu Apr 28 15:43:33 2005].517414 msOracleSpatialLayerOpen called
> with:
> GEOMETRIE from FLURST USING UNIQUE ID SRID 82027
> [Thu Apr 28 15:43:33 2005].676912 msOracleSpatialLayerOpen. Shared
> connection not available. Creating one.
> [Thu Apr 28 15:43:33 2005].676970
> msConnPoolRegister(gw,user/passwd at BOX.os,0x82c1b20)
> [Thu Apr 28 15:43:33 2005].682921 msOracleSpatialLayerFreeItemInfo
> was
> called.
> [Thu Apr 28 15:43:33 2005].683009 msOracleSpatialLayerWhichShapes
> was
> called.
> [Thu Apr 28 15:43:56 2005].723744 msOracleSpatialLayerFreeItemInfo
> was
> called.
> [Thu Apr 28 15:43:56 2005].723961 msOracleSpatialLayerClose was
> called.
> Layer connection: user/passwd at BOX.os
> [Thu Apr 28 15:43:56 2005].724036 msOracleSpatialLayerClose.
> Cleaning
> layerinfo handlers.
> [Thu Apr 28 15:43:56 2005].724211 msOracleSpatialLayerClose.
> Cleaning
> Oracle handlers.
> [Thu Apr 28 15:43:56 2005].724310
> msConnPoolRelease(gw,user/passwd at BOX.os,0x82c1b20)
> [Thu Apr 28 15:43:56 2005].724388
> msConnPoolClose(user/passwd at BOX.os,0x82c1b20)
> [Thu Apr 28 15:43:56 2005].733201 msDrawMap(): Layer 0 (gw),
> 23.216s
> [Thu Apr 28 15:43:56 2005].826353 msDrawMap(): Drawing Label
> Cache,
> 0.000s
> [Thu Apr 28 15:43:56 2005].826471 msDrawMap() total time: 23.310s
> Content-type: text/html
> X-Powered-By: PHP/4.3.8
>
> <IMG SRC=/~nicol/mapserver/tmp/111469581388261.png>
> <p>Anzahl der Layer: 1 - Anzahl der Klassen dieses Layers: 1[Thu
> Apr 28
> 15:43:56 2005].904965 msOracleSpatialLayerOpen called with:
> GEOMETRIE
> from FLURST USING UNIQUE ID SRID 82027
> [Thu Apr 28 15:43:57 2005].34902 msOracleSpatialLayerOpen. Shared
> connection not available. Creating one.
> [Thu Apr 28 15:43:57 2005].35066
> msConnPoolRegister(gw,user/passwd at BOX.os,0x8312cd8)
> [Thu Apr 28 15:43:57 2005].40125 msOracleSpatialLayerFreeItemInfo
> was
> called.
> [Thu Apr 28 15:43:57 2005].74273 msOracleSpatialLayerGetItems was
> called.
> [Thu Apr 28 15:43:57 2005].164273 msOracleSpatialLayerInitItemInfo
> was
> called.
> [Thu Apr 28 15:43:57 2005].164347 msOracleSpatialLayerFreeItemInfo
> was
> called.
> [Thu Apr 28 15:43:57 2005].164362 msOracleSpatialLayerGetItems was
> called.
> [Thu Apr 28 15:43:57 2005].244219 msOracleSpatialLayerInitItemInfo
> was
> called.
> x: 3405582.21859 - y: 5521435.53345 [Thu Apr 28 15:43:57
> 2005].244493
> msOracleSpatialLayerOpen called with: GEOMETRIE from FLURST USING
> UNIQUE
> ID SRID 82027
> [Thu Apr 28 15:43:57 2005].244511 msOracleSpatialLayerFreeItemInfo
> was
> called.
> [Thu Apr 28 15:43:57 2005].244527 msOracleSpatialLayerWhichShapes
> was
> called.
> [Thu Apr 28 15:43:57 2005].418013 msOracleSpatialLayerFreeItemInfo
> was
> called.
> [Thu Apr 28 15:43:57 2005].418058 msOracleSpatialLayerClose was
> called.
> Layer connection: gdv/gdv at BOX.GDV
> [Thu Apr 28 15:43:57 2005].418070 msOracleSpatialLayerClose.
> Cleaning
> layerinfo handlers.
> [Thu Apr 28 15:43:57 2005].418112 msOracleSpatialLayerClose.
> Cleaning
> Oracle handlers.
> [Thu Apr 28 15:43:57 2005].418124
> msConnPoolRelease(gw,user/passwd at BOX.os,0x8312cd8)
> [Thu Apr 28 15:43:57 2005].418140
> msConnPoolClose(user/passwd at BOX.os,0x8312cd8)
> Anzahl: 5 <br>0. Ergebnis stdClass Object
> (
>     [shapeindex] => 0
>     [tileindex] => -1
>     [classindex] => 0
> )
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 8826)]
> msOracleSpatialLayerGetShape (layer=0x8284b50, shape=0x830c430,
> record=0) at maporaclespatial.c:1258
> 1258        msOracleSpatialHandler *hand = (msOracleSpatialHandler
> *)layerinfo->orahandlers;
> (gdb)
>




-------------------------------------------------
  Univali - Webmail - http://webmail.univali.br



More information about the mapserver-users mailing list