[mapserver-dev] Single Pass Branch (mode=nquery)

Jim Klassen Jim.Klassen at ci.stpaul.mn.us
Wed Jun 10 18:49:10 EDT 2009


I have noticed another problem with the single pass branch and OracleSpatial layers. I haven't tested it yet, but I suspect from scanning the code it will effect PostGIS as well. It appears when query maps are enabled.

What appears to be happening is:
 1) the query is executed
      -> WhichShapes is called to setup the query/cursor and start the fetch
      -> NextShapes is called to fill the result set
 2) the query map is drawn which re-opens the layer, calls WhichShapes thus destroying the previous query state then closes the layer
 3) ReturnNestedTemplateQuery is called which expects the layer state to be the same as after step 1.

(gdb) bt
#0  msOracleSpatialLayerClose (layer=0x6841c0) at maporaclespatial.c:1622
#1  0x0000000000458689 in msDrawVectorLayer (map=0x66bba0, layer=0x6841c0, image=0x684050) at mapdraw.c:1018
#2  0x00000000004587ea in msDrawLayer (map=0x66bba0, layer=0x6841c0, image=0x684050) at mapdraw.c:743
#3  0x0000000000458ebd in msDrawQueryLayer (map=0x6841c0, layer=0x6841c0, image=0x684050) at mapdraw.c:1053
#4  0x0000000000459c7c in msDrawMap (map=0x66bba0, querymap=1) at mapdraw.c:439
#5  0x00000000004141b6 in msGenerateImages (mapserv=0x66a540, bQueryMap=0, bReturnOnError=1) at maptemplate.c:3868
#6  0x000000000041da39 in msReturnTemplateQuery (mapserv=0x66a540, queryFormat=0x66edd0 "text/xml", papszBuffer=0x0) at maptemplate.c:228
#7  0x0000000000411018 in main (argc=11, argv=<value optimized out>) at mapserv.c:1774


I've been staring at this too long... Anyone have any ideas on how to fix this?

Jim K


More information about the mapserver-dev mailing list