Segfault in WMS Capabilities when using nested groups #4638

Closed
tbonfort opened this Issue Apr 23, 2013 · 0 comments

Projects

None yet

2 participants

@tbonfort
Member

reported by @tomkralidis on IRC

layer def:

LABELITEM "stn_nam"

## all observations no matter what
 CLASSGROUP "all"

 CLASS
  NAME "All Observations"
  GROUP "all"
  STYLE
   SYMBOL "circle"
   SIZE 8
   COLOR 0 0 255
   OUTLINECOLOR 0 0 0
  END
 END

# # just latest observations
 CLASSGROUP "default"
#
 CLASS
  NAME "Accepted/Passed" # green
  GROUP "default"
  EXPRESSION ([latest_observation] = 1 AND [observation_qa_summary] = 100)
  STYLE
   SYMBOL "circle"
   SIZE 8
   COLOR 0 255 0
   OUTLINECOLOR 0 0 0
  END
  LABEL
#   PARTIALS FALSE
   TYPE truetype
   FONT arial
   SIZE 8
   OUTLINECOLOR 255 255 255
   OUTLINEWIDTH 2
   COLOR 46 46 46
   POSITION AUTO
   MAXSCALEDENOM 11000000
  END
 END

# many more classes with GROUP "default"

segfault:

$ gdb mapserv
(gdb) set args QUERY_STRING="map=/home/tomk/msc-ows/trunk/services/msc/config-en.map&service=WMS&version=1.3.0&request=GetCapabilities"
(gdb) run
...
...
...
        </AuthorityURL>
        <Identifier authority="taxonomy">/msc/observation/atmospheric/surface_weather/ra-1.0-ascii</Identifier>

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a900c8 in msDumpLayer (map=0x6058f0, lp=0x6131b0, nVersion=66304, script_url_encoded=0x63bd50 "http://host/msc-ows?",
    indent=0x65fd90 "        ", validated_language=0x0, grouplayer=0) at mapwms.c:2449
2449                         if (l < lp2->numclasses)
(gdb) bt
#0  0x00007ffff7a900c8 in msDumpLayer (map=0x6058f0, lp=0x6131b0, nVersion=66304, script_url_encoded=0x63bd50 "http://host/msc-ows?",
    indent=0x65fd90 "        ", validated_language=0x0, grouplayer=0) at mapwms.c:2449
#1  0x00007ffff7a90a7e in msWMSPrintNestedGroups (map=0x6058f0, nVersion=66304, pabLayerProcessed=0x65fd40 "", index=0, level=4, nestedGroups=0x65ffe0,
    numNestedGroups=0x660060, isUsedInNestedGroup=0x660030, script_url_encoded=0x63bd50 "http://host/msc-ows?", validated_language=0x0)
    at mapwms.c:2619
#2  0x00007ffff7a90c42 in msWMSPrintNestedGroups (map=0x6058f0, nVersion=66304, pabLayerProcessed=0x65fd40 "", index=0, level=3, nestedGroups=0x65ffe0,
    numNestedGroups=0x660060, isUsedInNestedGroup=0x660030, script_url_encoded=0x63bd50 "http://host/msc-ows?", validated_language=0x0)
    at mapwms.c:2644
#3  0x00007ffff7a90c42 in msWMSPrintNestedGroups (map=0x6058f0, nVersion=66304, pabLayerProcessed=0x65fd40 "", index=0, level=2, nestedGroups=0x65ffe0,
    numNestedGroups=0x660060, isUsedInNestedGroup=0x660030, script_url_encoded=0x63bd50 "http://host/msc-ows?", validated_language=0x0)
    at mapwms.c:2644
#4  0x00007ffff7a90c42 in msWMSPrintNestedGroups (map=0x6058f0, nVersion=66304, pabLayerProcessed=0x65fd40 "", index=0, level=1, nestedGroups=0x65ffe0,
    numNestedGroups=0x660060, isUsedInNestedGroup=0x660030, script_url_encoded=0x63bd50 "http://host/msc-ows?", validated_language=0x0)
    at mapwms.c:2644
#5  0x00007ffff7a90c42 in msWMSPrintNestedGroups (map=0x6058f0, nVersion=66304, pabLayerProcessed=0x65fd40 "", index=0, level=0, nestedGroups=0x65ffe0,
    numNestedGroups=0x660060, isUsedInNestedGroup=0x660030, script_url_encoded=0x63bd50 "http://host/msc-ows?", validated_language=0x0)
    at mapwms.c:2644
#6  0x00007ffff7a93cd5 in msWMSGetCapabilities (map=0x6058f0, nVersion=66304, req=0x605020, ows_request=0x7fffffffe490, requested_updatesequence=0x0,
    wms_exception_format=0x0, requested_language=0x0) at mapwms.c:3356
#7  0x00007ffff7a9982d in msWMSDispatch (map=0x6058f0, req=0x605020, ows_request=0x7fffffffe490, force_wms_mode=0) at mapwms.c:4833
#8  0x00007ffff7ad2010 in msOWSDispatch (map=0x6058f0, request=0x605020, ows_mode=-1) at mapows.c:243
#9  0x00007ffff7b62171 in msCGIDispatchRequest (mapserv=0x604de0) at mapservutil.c:1608
#10 0x000000000040152c in main (argc=2, argv=0x7fffffffe688) at mapserv.c:259
(gdb)

segfaulting code was introduced in ab427ac where lp2 was moved outside of the previous loop. assigning to @Schpidi

@Schpidi Schpidi was assigned Apr 23, 2013
@Schpidi Schpidi added a commit that referenced this issue May 7, 2013
@Schpidi Schpidi Resolving #4638. 937dcb6
@Schpidi Schpidi closed this May 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment